-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF8 from V8 not working #63
Comments
Good catch. As far as I can tell for now, it most likely related to the fact that enif_make_string doesn't support anything beyond latin1. Will see what can be done to get around this limitation. |
Hm but "ä" is in latin1. |
Either way, will look into this. On Thu, May 5, 2011 at 1:18 AM, jeena
|
Hi, sorry for a very long delay :) I've made some improvements in the Unicode handling part, and this seems to work: 1> {ok, VM} = erlv8_vm:start().
{ok,<0.38.0>}
2> Global = erlv8_vm:global(VM).
{erlv8_object,<<>>,<0.38.0>}
3> Global:set_value("a", unicode:characters_to_binary("ä")).
<<"ä">>
4> {ok, Ret} = erlv8_vm:run(VM, "(function() { return a })()").
{ok,<<"ä">>}
5> io:format("~ts~n",[Ret]).
ä Is this of any use? |
Yeah that looks nice :) I don't have the time now to test it myself, but I will add it to my todo list, thanks for your work! |
Hi,
When I do this:
I get a questionmark instead of the umlaut "ä", tried to find out why, at least V8 seems to be capable of using UTF8, but couldn't find anything.
The text was updated successfully, but these errors were encountered: