summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lobject.js b/src/lobject.js
index bd10be8..b5d4a96 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -607,9 +607,12 @@ const luaO_pushvfstring = function(L, fmt, argp) {
}
break;
}
- case char['U']:
- pushstr(L, defs.to_luastring(String.fromCodePoint(argp[a++])));
+ case char['U']: {
+ let buff = new Uint8Array(UTF8BUFFSZ);
+ let l = luaO_utf8esc(buff, argp[a++]);
+ pushstr(L, buff.subarray(UTF8BUFFSZ - l));
break;
+ }
case char['%']:
pushstr(L, defs.to_luastring("%", true));
break;