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

UTF-16 Source Code Cannot be Recognized #52

Closed
JitCompiler opened this issue Oct 2, 2017 · 1 comment
Closed

UTF-16 Source Code Cannot be Recognized #52

JitCompiler opened this issue Oct 2, 2017 · 1 comment

Comments

@JitCompiler
Copy link

JitCompiler commented Oct 2, 2017

Javascript source code should be in unicode characters. But when I tried to compile the source file in UTF16 format (either big endian or little endian) , it complaint about syntax error when it read the first byte of the source file (which contains the 0xFEFF Byte Order Mark).

Does mujs support unicode at all? In particular, how should I code text strings having unicode characters?

@ccxvii
Copy link
Owner

ccxvii commented Oct 3, 2017

MuJS currently only supports UTF-8 encoded source text. UTF-16 is an abomination and should be avoided, IMO :)

Either use UTF-8, or use ASCII and escape sequences to encode unicode characters in strings: "\u00A9".

@ccxvii ccxvii closed this as completed Feb 25, 2019
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