[Project_owners] Open unicode files with jslib ?

Pete Collins pete at mozdev.org
Fri Nov 7 12:10:53 EST 2003

Erwan Loisant wrote:
> Hello.
> I am playing with jslib file.js module, and I want to read an UTF8 file. 
> It contains both Japanese and French, so unicode is mandatory.
> When I simply open this text file in Firebird (just entering location in 
> location bar) it is correctly displayed. However, when I load it using f 
> = new File(); and read it, Japanese character and French special accents 
> are broken. It seems like jslib read it as a western europe encoded file.
> Is there any way to tell to jslib that the file is in unicode ?

I think that is because the javascript language uses the ASCII character 

What hapends if you read the contents into a buffer and then write them 
out to a file?

How are you actually reading the file?

Via dump/stdout?


Pete Collins

More information about the Project_owners mailing list