I´m writing a program where I read a file which contains some japanese
characters. When I add these to e.g. a JLabel they show up fine, but if
I write them to a file or System.out they come out as ??. I have
checked the string in a debugger and it shows the Unicode values in the
string like:
\u9023 as expected but I can´t seem to get them to print correctly?
Oliver Wong - 07 Nov 2006 15:38 GMT
> I´m writing a program where I read a file which contains some japanese
> characters. When I add these to e.g. a JLabel they show up fine, but if
> I write them to a file or System.out they come out as ??. I have
> checked the string in a debugger and it shows the Unicode values in the
> string like:
> \u9023 as expected but I can´t seem to get them to print correctly?
Two seperate problems:
for file: Did you specify an encoding?
For system.out: Could it be that your terminal (i.e. cmd.exe or bash or
whatever) doesn't support unicode?
- Oliver