我无法相信。 在我解决了Eclipse控制台和Python中的编码问题之后,我认为我不会再遇到问题。 但现在这个:
我在项目TestMe中有一个程序test.py,如下所示:
print "ö"- > Run as... Python Run结果
ö到现在为止还挺好。 当我现在通过右键单击/复制并粘贴来复制EasyEclipse中的程序时,我会在同一个看起来完全相同的项目中收到test.py的程序副本:
print "ö"- > Bun Run as... Python Run结果
ö我注意到,文件属性从编码UTF-8更改为默认,但也更改为UTF-8在这里没有帮助。 这两个文件之间的另一个区别是行结尾,即原始文件中的“Windows”和副本中的“Unix”(复制的明确定义,顺便说一句)。 在Notepad ++中更改此内容也不会改变任何内容。
我很困惑......
设置:Python 2.5 Windows 7 Easy Eclipse 1.2.2.2
我设置为UTF-8 / Windows的设置:项目/右键单击/属性文件/右键单击/属性窗口/首选项/工作区
I can't believe it. After I solved my question in Problems with Encoding in Eclipse Console and Python I thought it wouldn't happen again that I got problems here. But now this:
I have a program test.py in the project TestMe that looks like this:
print "ö"-> Run as... Python Run results in
öSo far so good. When I now copy the program in EasyEclipse by right click/copy and paste I receive the program copy of test.py in the same project that looks exactly the same:
print "ö"-> Bun Run as... Python Run results in
öI noticed, that the file properties changed from Encoding UTF-8 to Default, but also changing to UTF-8 doesn't help here. Another difference between the two files is the line ending which is "Windows" in the original file and "Unix" in the copy (great definition of copy, btw). Changing this in Notepad++ also doesn't change anything.
I am perplexed...
Set up: Python 2.5 Windows 7 Easy Eclipse 1.2.2.2
Settings that I've set to UTF-8 / Windows: Project/Rightclick/Properties File/Rightclick/Properties Window/Preferences/Workspace
最满意答案
有几个地方要改变编码,最先沉浸其中:
工作区Window > Preferences > General > Workspace 项目属性 文件属性 运行配置。使用第一种方法是最有用的方法,因为其他方法包括控制台默认继承它,这可能是你想要的。
Several places to change the encoding, most immersive first:
Workspace Window > Preferences > General > Workspace Project Properties File Properties Run Configuration.Using the first method is the most useful one as the others including the console inherit from it by default which is probably what you want.
更多推荐
发布评论