Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get Console to show Chinese?

I've always wondered if it would be possible to show UTF8 or UTF16-Chinese text in a Console window, e.g., Console.WriteLine(chinese). For the time being, it shows up as ???. Is it possible to kick up a Console session that supports Chinese characters?

like image 523
tofutim Avatar asked Jun 19 '11 22:06

tofutim


1 Answers

urxvt, the Unicode rxvt, is a Xwindow "console" that will show Chinese characters. Assuming you're using Windows, this can work under Cygwin or coLinux.

also see Unicode characters in Windows command line - how?. I haven't yet figured out how to change the font to Lucida, but at least chcp 65001 got rid of the question marks.

changing console font looks complicated: https://superuser.com/questions/5035/how-to-change-the-windows-console-font. (update: switched to Lucida by right-clicking on the console icon from within the Windows console; selecting Properties; the Font tab; and selected Lucida. no help, the Chinese characters show as blocks).

This: http://www.vistax64.com/powershell/239480-display-unicode-utf-8-files-windows-console.html, mentions Powershell ISE and Console2 (http://www.ghacks.net/2008/06/09/console-2-a-better-cmdexe/) as being able to display Chinese characters.

like image 53
jcomeau_ictx Avatar answered Nov 17 '22 00:11

jcomeau_ictx