aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-07-28 12:01:27 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-07-28 12:01:27 +0200
commitd0ecff13e2507ae7c860e87e39078f79df83e309 (patch)
tree7e1a0712d4587089b3a1598145b2e129dcea22e1
parent19c5edf878d0cc0271759900ac92a7aa420be061 (diff)
downloadfengari-d0ecff13e2507ae7c860e87e39078f79df83e309.tar.gz
fengari-d0ecff13e2507ae7c860e87e39078f79df83e309.tar.bz2
fengari-d0ecff13e2507ae7c860e87e39078f79df83e309.zip
README: Added details about strings conversion
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 6b5429c..d5fd8a3 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ Fengari implements Lua 5.3 semantics and will hopefully follow future Lua releas
Lua strings are 8-bits clean and can embed `\0`. Which means that invalid UTF-8/16 strings are valid Lua strings. Lua functions like `string.dump` even use strings as a way of storing binary data.
-To address that issue, Lua strings are represented by an array of bytes in Fengari. To push a JS string on the stack you can use `lua_pushliteral`. To get a Lua string on the stack as a JS string you can use `lua_tojsstring`.
+To address that issue, Lua strings are represented by an array of bytes in Fengari. To push a JS string on the stack you can use `lua_pushliteral` which will convert it to an array of bytes before pushing it. To get a Lua string on the stack as a JS string you can use `lua_tojsstring` which will attempt to convert it to a UTF-16 JS string. The latter won't give you what you expect if the Lua string is not a valid UTF-16 sequence.
### _Missing_ features