对于Eclipse Unipre控制台支持:
- 添加
-Dfile.encoding=UTF-8
到eclipse.ini
eclipse安装目录中。 - 在日食中-
RunRun ConfigurationsPython RunconfigurationCommon
确保选择UTF-8 - 在日食中-
WindowPreferencesGeneralWorkspaceText file encoding
确保选择了UTF-8 - 从
[python install path]Libsite.py
-更改encoding = "ascii"
为encoding = "utf-8"
- 确保您在Eclipse中使用支持Unipre的字体-
WindowPreferencesAppearanceColors and FontsDebugConsole fontEdit
在安装中,我完成了以上所有操作:
print(u"שלום עולם") # Doesn't workprint("שלום עולם") # Works对于Django模型:
print(my_model.my_field) # Doesn't workprint(my_model.my_field.enpre('utf-8')) # Works


