我使用cmd Windows,chcp 65001,这是我的代码:
但是,当我使用这段代码时:
print u'\u0110 \u0110' + '\n'
结果:
(a character cmd can't display) (character what i want)
Traceback (most recent call last):
File "b.py", line 26, in <module>
print u'\u0110 \u0110'
IOError: [Errno 2] No such file or directory
但是,当我使用这段代码时:
print u' \u0110 \u0110' + '\n'
结果:
(a space)(charecter what i want) (character what i want)
Traceback (most recent call last):
File "b.py", line 26, in <module>
print u' \u0110 \u0110' + '\n'
IOError: [Errno 2] No such file or directory
我的屏幕:
我的问题是:
为什么Python 2.7在打印Unicode字符时需要加空格?
如何修复IOError:[Errno 2]?