• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Chinese (Unicode) issue in Windows command Prompt

 
Greenhorn
Posts: 3
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i am working on Chinese language issue,

In English OS when i try to print the Chinese characters in Windows command prompt, It does not support instead of it printing "???"

In Chinese OS It displays correctly.

please give me some ideas to clear this issue.

The following scenarios i have tested,

1. Installed the Language pack for chinese language.
2. Writing the Chinese characters using the printStream
3. Decoded to UTF8 Characters
4. Changing the System locales in control panel


But it does not helped me lot.


Thanks in Advance.

Udhay
 
Marshal
Posts: 79928
396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this question might fit better elsewhere, so I shall duplicate it.

I Googled and found this; I haven't tried it so I don't know whether it works, but it looks promising.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First off the English Windows OS does not come with East Asian (Chinese, Japanese, Korean) fonts. Installing that font pack may help.

Another issue does Windows command prompt support UTF8 for English OS? Can the command prompt specify what font it can use?

If you run the program inside an IDE, the font should display without problem.
 
Sheriff
Posts: 28321
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the Windows shell, it's the "Code Page" which determines how bytes are converted to glyphs on the screen. You can use the CHCP command to change your shell's code page and to determine what it is.

So: In your Chinese Windows, use CHCP to find out what code page it's using. Then in your other-place Windows, use CHCP to change the code page to that code page before you run your application. (It may be the case that your other-place Windows doesn't support that code page, and you might have to install something to make it change its mind about that.)
 
I was her plaything! And so was this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic