python 3.0, how to make print() output unicode?

前端 未结 5 1678
猫巷女王i
猫巷女王i 2020-11-28 15:49

I\'m working in WinXP 5.1.2600, writing a Python application involving Chinese pinyin, which has involved me in endless Unicode problems. Switching to Python 3.0 has solved

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 16:30

    The Windows command prompt (cmd.exe) cannot display the Unicode characters you are using, even though Python is handling it in a correct manner internally. You need to use IDLE, Cygwin, or another program that can display Unicode correctly.

    See this thread for a full explanation: http://www.nabble.com/unable-to-print-Unicode-characters-in-Python-3-td21670662.html

提交回复
热议问题