我可以让控制台显示中文吗? [英] Can I get Console to show Chinese?

查看:87
本文介绍了我可以让控制台显示中文吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直想知道是否可以在Console窗口中显示UTF8或UTF16-中文文本,例如Console.WriteLine(chinese).目前,它显示为???.是否可以启动支持汉字的Console会话?

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?

推荐答案

urxvt(Unicode rxvt)是Xwindow的控制台",将显示汉字.假设您使用的是Windows,则可以在Cygwin或coLinux下使用.

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.

另请参见 Windows命令行中的Unicode字符-怎样?.我还没有弄清楚如何将字体更改为Lucida,但是至少chcp 65001摆脱了问号.

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.

更改控制台字体看起来很复杂: https://superuser.com/questions/5035/how-to-to-change-the-windows-console-font .(更新:通过在Windows控制台中右键单击控制台图标;选择属性";字体"选项卡;然后选择"Lucida",切换到Lucida.没有帮助,中文字符显示为块.)

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).

此: http://www.vistax64.com/powershell/239480-display-unicode-utf-8-files-windows-console.html ,其中提到了Powershell ISE和Console2( http://www.ghacks.net/2008/06/09/console-2-a-better-cmdexe/),因为它可以显示汉字.

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.

这篇关于我可以让控制台显示中文吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆