Page 1 of 1

Javascript file contents displayed as Chinese?!

Posted: Thu Sep 02, 2010 11:27 pm
by jakob
Hi,

using OxygenXML 11.2 on MacOS X, I've noticed that sometimes Javascript files are displayed as garbage. To better illustrate the problem see here:

http://imagebin.ca/view/mJC4DaQ1.html

I should add that all files are managed by Subversion (on a Windows server), so maybe it has something to do with line endings?

Another case was when I downloaded a Javascript file that was UTF-8 and tried opening it with OxygenXML. I actually had to cut the contents and paste it in a new file that I created with OxygenXML.

If it helps, I can also provide the source code files.

Thanks for your help (in the meantime, I'll be using Dashcode or TextEdit :( ),
Jakob.

Re: Javascript file contents displayed as Chinese?!

Posted: Fri Sep 03, 2010 1:44 pm
by adrian
Hello,

This looks like an encoding problem.
Look in Options -> Preferences -> Encoding at the option "Encoding for non XML files". Oxygen uses the encoding specified here for all non-XML files(JavaScript included) without detecting the encoding of the file.
Change this option to UTF8 and try to reopen the file in Oxygen.

Regards,
Adrian

Re: Javascript file contents displayed as Chinese?!

Posted: Fri Sep 03, 2010 5:36 pm
by jakob
Thanks Adrian, I did what you suggested and it works. Thanks a lot! What's the difference between Unicode (the previous setting) and UTF-8?

Jakob.

Re: Javascript file contents displayed as Chinese?!

Posted: Tue Sep 07, 2010 10:03 am
by adrian
The two mentioned encodings don't have much in common:
http://www.ingrid.org/java/i18n/encoding/table.html (look at the end)

Regards,
Adrian