Sean Sean - 1 month ago 13
Python Question

Why unicode string is not shown on PyCharm's console?

Environment: Windows 8 + PyCharm 5.0 + Python 2.7.9

print "123" # OK

print u"123" # Show empty line on the console?


My "File Encodings" already set to UTF-8, and I also
add:

"-Dconsole.encoding=UTF-8"


in the file "pycharm.exe.vmoptions", but still encounter the issue.

Answer

Add following line in the file "pycharm.exe.vmoptions" can fix the issue:

-Dfile.encoding=UTF-8 

It seems to be a bug from PyCharm 5.0...