Korean language broken

J

J.H.Kim

Hi, everyone

I'm using debian linux and my locale is EUC-KR.
When I use Korean language in source such as printf,
the character is broken in console just showing "????".

How can I solve this problem?

Thanks in advance.

Best Regards,
J.Hwan Kim
 
T

Tom Anderson

I'm using debian linux and my locale is EUC-KR. When I use Korean
language in source such as printf, the character is broken in console
just showing "????".

How can I solve this problem?

It's probably a mismatch between the character encoding being used by
java, your shell, your X server, and so on.

I assume that you have a normal text editor which can happily edit text
files containing Korean characters.

First, try redirecting the console output to a file:

java PrintingProgram >test.txt

Then look at that file with your normal text editor.

If that file looks okay, then the problem is that your console is not
using the right character encoding. I don't know how you'd fix that; i
suggest you ask on a Korean linux newsgroup.

If that file looks like nonsense, then the problem is probably that java's
default character encoding is not set correctly. It may be using UTF-8 or
ISO-Latin-1 when it should be using ISO2022KR or something. Or that it's
using ISO-Latin-1 when it should be using UTF-8. Whatever, the solution is
probably to set the file.encoding system property to the name of the
appropriate character encoding when you start java.

There's probably a way to set the character encoding globally, so java
uses it as a default, but i don't know what that is.

tom
 
R

Roedy Green

I'm using debian linux and my locale is EUC-KR.
When I use Korean language in source such as printf,
the character is broken in console just showing "????".

The console is constrained by the OS's console support. The Korean
set is only supported by the GUI, and then only with fonts that
support Korean.

There might be a way to change the encoding of the console, perhaps
with some OS configuring command.

I have treated the console as a debugging tool, presumably capable
only of ASCII.
 

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,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top