jackxiao / jslibs

Automatically exported from code.google.com/p/jslibs
0 stars 0 forks source link

A way to make jslibs read UTF-8 script files correctly. #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Jslibs doesn't read scripts stored as UTF-8 correctly. For example, if you
store the following code in a UTF-8 text file and run it with jshost the
output will be "2" (=the number of bytes), which is incorrect:
LoadModule("jsstd");
Print("ö".length);
If you instead store it as UTF-16 the output will be "1" (=the number of
characters), which is correct.
I would like a command line option which lets you choose which encoding to
use: -encoding UTF-8

Original issue reported on code.google.com by osk...@gmail.com on 24 Apr 2010 at 4:30

GoogleCodeExporter commented 9 years ago

Original comment by sou...@gmail.com on 27 Apr 2010 at 9:17

GoogleCodeExporter commented 9 years ago
Now the script loader should detect the file encoding.
Feel free to reopen the issue if feature do not work properly.

Original comment by sou...@gmail.com on 23 May 2011 at 9:46