Japanese character encoding

S

SupaDemon

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?
 
O

Oliver Wong

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top