How to get PyCharm to display unicode data in its console?

17,331

Solution 1

The accepted answer is no longer correct. Of the default fonts, none of them make a difference. I just spent awhile going through this same problem and the best solution is to modify your .bash_profile (or .zshrc) and include the line:

export PYTHONIOENCODING=UTF-8

In theory, you could also add this to your Environment Variables which you can set from within Preferences->Build,Execution,Deployment->Python Console This approach, however, seems to be broken in the build I am using (4.0.4)

Solution 2

You need to change the console font to the one which contains the required Unicode glyphs:

console font

Share:
17,331
Agam Rafaeli
Author by

Agam Rafaeli

You say potato, I say let's blow this joint

Updated on July 24, 2022

Comments

  • Agam Rafaeli
    Agam Rafaeli over 1 year

    I have switched over to PyCharm and have had a blast using it. I code for projects that use languages other than English (i.e. Hebrew and Arabic) and need to debug encodings once in a while. For some reason, PyCharm will not display Unicode characters in its debug console.

    I have set the IDE encoding to UTF-8 but it did not help.

    Any ideas?

  • Agam Rafaeli
    Agam Rafaeli about 11 years
    Thank you...that is exactly what helped. Great screen shot
  • r---------k
    r---------k over 9 years
    I'm having the same problem, unicodes display '?' with white background. which even breaks bpython, it's kind of annoying. This solution hasn't helped me (no Consolas font, but all the ones I tried gave same result... using PyCharm 3.4.1), any other clue ?
  • Avamander
    Avamander over 6 years
    Best solution is to add that line to the startup script of PyCharm.