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

前端 未结 2 1273
后悔当初
后悔当初 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 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.

提交回复
热议问题