在Scala Worksheet Eclipse插件中的结果编码 [英] Results encoding in Scala Worksheet Eclipse plugin
问题描述
如何在Eclipse中更改工作表中的结果的字符集编码?
How can I change charset encoding for results in the Worksheet in Eclipse?
object workbook1 {
"cyrillic A is: " + "А" //> res0: String("cyrylic A is: Рђ") = cyrylic A is: Рђ
}
编辑器的编码是UTF-8。结果打印到编辑窗口中,但结果的编码是不同的。这是在Windows。
Editor's encoding is UTF-8. Results are printed right into editors window, but the encoding of results is different. This is in Windows.
推荐答案
非常感谢@Excelan的原始问题和解决方案,它肯定让我指向正确的方向!
Many thanks to @Excelan's original question and solution as it definitely got me pointed in the right direction!
在使用我创建的新项目时,我遇到了使用Scala Eclipse IDE的这个问题,但在使用导入的项目时没有遇到这个问题。一旦我看到Excelan的关于编码的评论,我开始戳,你可以更改Eclipse默认文本文件编码的所有项目的首选项,如:
I was experiencing this problem using the Scala Eclipse IDE when working with new projects I created, but was not experiencing the problem when using imported projects. Once I saw Excelan's comment about the encoding I started poking around, you can change the Eclipse default text file encoding for all projects in the Preferences like so:
Open Preferences
Expand the "General" menu.
Select the "Workspace" menu.
Change "Text file encoding" option from Default to Other and select UTF-8.
一旦我按照这些步骤,关闭并重新打开eclipse。
Once I followed those steps, closed and reopened eclipse. Every new worksheet created after that works just fine!
要更改项目级别的设置,请右键单击项目并选择属性。文本文件编码位于资源菜单下。
To change the settings on a project level, right click the project and select properties. The text file encoding is found under the "Resources" menu.
要更改单个文件的设置,请右键单击该文件并选择属性。
文本文件编码位于资源菜单下。
To change the settings for a single file, right click the file and select properties. The text file encoding is found under the "Resources" menu.
这篇关于在Scala Worksheet Eclipse插件中的结果编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!