在Pydev中使用utf-8

打开Eclipse,

1. Windows->Preferences->General->Editors->Text Editors->Spelling->Encoding,设置为UTF-8

2. Windows->Preferences->General->Workspace->Text file encoding,设置为UTF-8

3. Windows->Preferences->Pydev->Editors->Templates,将所有Context为New Module的Pattern都加上一句

# -*- coding: utf-8 -*-(注意,不是UTF-8,只能小写)

 

OK,现在新建一个Pydev Module试试 print u'你好,世界'。

你可能感兴趣的:(utf-8,pydev)