From: Panayotis K. <pan...@pa...> - 2010-02-26 15:10:51
|
On 26 Φεβ 2010, at 4:35 ΜΜ, Stand Trooper wrote: > To help me debug what issues you might be seeing and how to > reproduce the issue, please include the following: > 1) OS - Windows (include if it's a special version, e.g. the > Japanese OS, or what have you), Mac and the version, or flavor of > linux > 2) how you're viewing the sout - is it in an xterminal you're > running your code with? or a windows cmd? An IDE debugger pane? > 3) Which version of Java you're compiling and running against. This > part isn't as important since unicode in Java will run just about > the same on all of the JDKs since 1.1 - but might help I know all the problems of utf-8 in java files and know these (and other) conversion solutions. The problem is not with display issues but with bad conversion by xmlvm. I am a long time supporter of UTF-8 and I have helped a lot to properly handle UTF-8 and especially greek encodings under Linux and X11. Just for reference though, since you asked it, I am under Mac OSX. On 26 Φεβ 2010, at 4:46 ΜΜ, Sascha Haeberling wrote: > Thank you Time for the good tips, I think you are right. > > However, one thing I am curious about: Would this example work in > Objective-C if you put this string in an .m file? Because we could > do some conversion when we take the XMLVM file and convert it to > Objective-C. The question is, should it be UTF-8 in the .m file or > should it be escaped there? > > // Sascha Exactly that's my point. Java compiler (with a proper -encoding option) is able to handle non- ASCII source files for some time now. So the characters inside the class are correct (and display correctly if run as java application). The conversion though has problems and produces something with errors. Sascha, as you asked, if I use the same UTF-8 characters in a .m file, (i.e. if I go to the source code and replace it), then the file is compiled correctly. |