CJK Text in Console Application

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TheOne

    CJK Text in Console Application

    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(perso n + ", ¾È³çÇϼ¼¿ä");
    System.Console. WriteLine(perso n + ", ¿À·¡°£¸¸ÀÔ´Ï´Ù" );
    }
    }

    __ 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

    #2
    Re: CJK Text in Console Application

    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.


    "TheOne" <daewon.yoon@gm ail.comwrote in message
    news:1162912437 .610332.271720@ m7g2000cwm.goog legroups.com...
    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(perso n + ", ¾È³çÇϼ¼¿ä");
    System.Console. WriteLine(perso n + ", ¿À·¡°£¸¸ÀÔ´Ï´Ù" );
    }
    }

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


    Comment

    • TheOne

      #3
      Re: CJK Text in Console Application

      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.
      >
      >
      "TheOne" <daewon.yoon@gm ail.comwrote in message
      news:1162912437 .610332.271720@ m7g2000cwm.goog legroups.com...
      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(perso n + ", ¾È³çÇϼ ¼Â¿Ã¤");
      System.Console. WriteLine(perso n + ", ¿À·¡°£¸ ¸Ã€Ã”´Ï´Ù") ;
      }
      }
      >
      __ 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?

      Comment

      • Mihai N.

        #4
        Re: CJK Text in Console Application

        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 SetConsoleOutpu tCP, 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.


        --
        Mihai Nita [Microsoft MVP, Windows - SDK]
        Best internationalization practices, solving internationalization problems.

        ------------------------------------------
        Replace _year_ with _ to get the real email

        Comment

        Working...