【发布时间】:2017-01-07 23:22:40
【问题描述】:
我正在使用 Visual Studio Code、Python 3.5.2、Windows 10
print("£")
产生 2 个我不熟悉的符号。
input("Enter pound sign: ") -> £
产生错误: UnicodeDecodeError:“utf-8”编解码器无法解码位置 0 中的字节 0x9c:无效的起始字节
以上示例使用 Python IDLE 可以完美运行。 我尝试在 Visual Studio Code 中更改编码,但没有成功。
我使用 Python 3.5.2 已经有一段时间了,我在使用 Sublime Text 3 时从来没有遇到过这个问题。
非常感谢您提供解决此问题的建议。
【问题讨论】:
标签: python-3.5