python - 配置 IDLE 以使用 Unicode

标签 python unicode python-idle

如何让 IDLE 使用 UTF-8 作为我的 Python 文件的默认编码?

IDLE 设置中没有“编码”选项。

最佳答案

就放special comment line在 Python 文件的开头:

# -*- coding: utf8 -*-

关于python - 配置 IDLE 以使用 Unicode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26673342/

相关文章:

python2.7 : Could not import get_url from bottle

python - 在 Pandas 的时间之间排除

java - 如何在android中将Unicode字符串转换为文本

c++ - WideCharToMultiByte 问题

Python:使用 PyCharm 和 IDLE/python 时的不同结果

在 Geany 中工作的 Python 代码不在 IDLE 中?

python - 溢出错误: int too large to convert to float even with "Decimal" - Python

ios - 检查给定字符是否是 Objective-C 中的表情符号

linux - 在 Linux 上调用 Python IDLE

python - 删除Django项目中requirements.txt中的冗余