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

前端 未结 2 1254
后悔当初
后悔当初 2020-12-18 14:19

Environment: Windows 8 + PyCharm 5.0 + Python 2.7.9

print \"123\" # OK

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

My \"File Encoding

相关标签:
2条回答
  • 2020-12-18 14:58

    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...

    0 讨论(0)
  • 2020-12-18 15:00

    Like Sean mentioned add the following line to file "pycharm.exe.vmoptions" and also "pycharm64.exe.vmoptions":

    -Dfile.encoding=UTF-8

    Close Pycharm if it's open. Then restart Pycharm5. It's a stupid bug.

    0 讨论(0)
提交回复
热议问题