2
votes

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.

2
What are you using for a console? For simple text like your example, the encoding shouldn't matter. - Mark Ransom
@MarkRansom: I use Run/Debug console. Is that what you mean? - Sean
Yes, that's what I mean. Unfortunately I don't know PyCharm so at this point I can't help. Which OS are you using? - Mark Ransom
@MarkRansom: Windows 8 - Sean
May be font that used in PyCharm's console have no such symbol? - fghj

2 Answers

4
votes

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
votes

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.