To support the unicode eclipse console:
- Add
-Dfile.encoding=UTF-8to eclipse.ini, which is located in the eclipse installation directory. - In eclipse -
Run\Run Configurations\Python Run\configuration\Common\make sure UTF-8 is selected - In eclipse -
Window\Preferences\General\Workspace\Text file encoding\make sure UTF-8 is selected - B
[python install path]\Lib\site.py- go from encoding = "ascii"toencoding = "utf-8" - Make sure you use unicode supporting fonts in eclipse -
Window\Preferences\Appearance\Colors and Fonts\Debug\Console font\Edit
During the installation process, I did all of the above:
print(u"שלום עולם")
print("שלום עולם")
django:
print(my_model.my_field)
print(my_model.my_field.encode('utf-8'))