-
Notifications
You must be signed in to change notification settings - Fork 160
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 fixes #246
Unicode fixes #246
Conversation
This should not be needed. Uprintf implementation is responsible for doing that. |
What platform are you testing on? Does |
What I meant is that it should be fixed by modifying uprintf implementation instead of changing only hl_sys_print. I'm testing on Windows. And yes it's using wprintf which does not seem to correctly convert to utf8. But this seems quite tricky because Windows terminal is not utf8 so trace("é") works with wprintf in cmd but does not work when converting to utf8, it shows é in terminal. |
I fixed it for windows in 3c6164d (+ just added stderr as well) @Aurel300 on other platforms, look at uprintf implementation in ucs2.c |
Yes, you're right – I thought |
convert to UTF-16 before printing insys_print
(similar to the fix in hxcpp)0xD7C0
was used instead of0xD800
for high surrogatesSys.putEnv("TEST_VAR", "😉"); trace(Sys.getEnv("TEST_VAR"));
did not produce the correct result (UTF-16 to UTF-8 conversion was wrong)