posts - 15, comments - 10, trackbacks - 0, articles - 0

如何在eclipse console中支持中文输出

Posted on 2013-04-21 08:43 whspecial 阅读(736) 评论(0)  编辑 收藏 引用 所属分类: 工具使用

在这个哥们的网站上看到的,好像已经看了好几次这哥们的资料了,感谢!
http://www.mkyong.com/java/how-to-display-chinese-character-in-eclipse-console/comment-page-1/#comment-132022

By default, Eclipse will output Chinese or non-english characters as question mark (?) or some weird characters. This is because the default encoding is inherited from the project – run configuration. Often times, the default encoding is Cp1252, which is unable to render the Chinese character correctly.

To enable Eclipse to display Chinese character correctly, see following steps :

1. In Eclipse, right click on your application class, and choose Run As –> Run Configurations

2. In Common tab, Console Encoding group, click on the “Other” and select the UTF-8

3. Done, Eclipse is able to display the Chinese character now.


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理