Skip to content
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

Unicode behaviour different between Erlang and Erjang #86

Open
oubiwann opened this issue Apr 9, 2014 · 4 comments
Open

Unicode behaviour different between Erlang and Erjang #86

oubiwann opened this issue Apr 9, 2014 · 4 comments

Comments

@oubiwann
Copy link

oubiwann commented Apr 9, 2014

In Erlang, Unicode presentation looks like this:

io:format([8482]).
™ok

In Erjang:

> io:format([8482]).
\x{2122}ok
@rvirding
Copy link
Contributor

rvirding commented Apr 9, 2014

What does LFE print?

@oubiwann
Copy link
Author

oubiwann commented Apr 9, 2014

Plain (non-Erjang) LFE has the following behaviour when started with both +pc latin1 and +pc unicode:

(io:format (list 8482))
™ok

@oubiwann
Copy link
Author

oubiwann commented Apr 9, 2014

In a related note, @rvirding may have found the source of the Java string output rendering problem (ticket #84): not handing Unicode in the LFE pretty printer code... we're still examining this, though.

@oubiwann
Copy link
Author

Hrm, another oddity: io_lib:format on LFE+Erjang doesn't seem to return anything...

In Erlang:

> io_lib:format("~ts", [unicode:characters_to_binary([8432])]).
[[8432]]

In Erjang:

1> io_lib:format("~ts", [unicode:characters_to_binary(List2)]).
[[8432]]

In plain LFE:

> (io_lib:format '"~ts" (list (unicode:characters_to_binary '(8482))))
((8482))
>

In LFE on Erjang:

> (io_lib:format '"~ts" (list (unicode:characters_to_binary '(8482))))
>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants