CJK Text in Console Application

  • Thread starter Thread starter TheOne
  • Start date Start date
T

TheOne

I'm newbie. I tried to compile and excute this super simple code.
== codestart ==

class Sample1 {
static void Main() {

string person;
person = "ÀÌÈ¿¸®¾¾";
System.Console.WriteLine(person + ", ¾È³çÇϼ¼¿ä");
System.Console.WriteLine(person + ", ¿À·¡°£¸¸ÀÔ´Ï´Ù");
}
}

__ code end __
When I excute the program, the console doesn't show korean texts,
instead it's showing ????. I'm using Korean OS, so there are already
korean fonts.

How can I make my console to print korean texts properly?
 
Do you see Korean text on your console under any circumstances (with any
software)? I am not sure whether the console supports any character sets at
all other than the original IBM PC character set.


I'm newbie. I tried to compile and excute this super simple code.
== codestart ==

class Sample1 {
static void Main() {

string person;
person = "ÀÌÈ¿¸®¾¾";
System.Console.WriteLine(person + ", ¾È³çÇϼ¼¿ä");
System.Console.WriteLine(person + ", ¿À·¡°£¸¸ÀÔ´Ï´Ù");
}
}

__ code end __
When I excute the program, the console doesn't show korean texts,
instead it's showing ????. I'm using Korean OS, so there are already
korean fonts.

How can I make my console to print korean texts properly?
 
Michael A. Covington 작성:
Do you see Korean text on your console under any circumstances (with any
software)? I am not sure whether the console supports any character setsat
all other than the original IBM PC character set.


I'm newbie. I tried to compile and excute this super simple code.
== codestart ==

class Sample1 {
static void Main() {

string person;
person = "ÀÌÈ¿¸®¾¾";
System.Console.WriteLine(person + ", ¾È³çÇü¼¿ä");
System.Console.WriteLine(person + ", ¿À·¡°£¸¸ÀԴôÙ");
}
}

__ code end __
When I excute the program, the console doesn't show korean texts,
instead it's showing ????. I'm using Korean OS, so there are already
korean fonts.

How can I make my console to print korean texts properly?

Hm....

I should have more experimented with my console. When I set the default
code page of the cmd window to 949 (ansi/oem - korean), the application
worked fine. I had thought probably it's releated to the fact that I
didn't used the Setlocale corresponding function in my simple
application. Because I didn't really understand what Locale is, I tried
to learn it by asking questions in this group.

BTW, I also tried to put some japanese texts which clearly is in
another code page than korean text. Is it possible to view korean and
japanese texts on one cmd window? For that, I guess I need to have a
unicode cmd window, am I right? Is there any unicode cmd window?
 
BTW, I also tried to put some japanese texts which clearly is in
another code page than korean text. Is it possible to view korean and
japanese texts on one cmd window?

Not possible.

For that, I guess I need to have a
unicode cmd window, am I right? Is there any unicode cmd window?

The unicode support in the cmd window is a late patch and not too good.

You can try starting cmd with /U and set the console code page to unicode.
(the managed equivalent of SetConsoleOutputCP, if there is one)

You might end up displaying Korean (or Japanese), and the other one
will siaplsy as squares. But you will not get both showing correctly.
 
Back
Top