2024-05-19 20:12:05 发布
网友
在Python中,defaultencoding存储在unicode_default_encoding中,我找到了所有Python源代码,其中有2个函数。在
_PyUnicode_Init() //strcpy(unicode_default_encoding, "ascii");
setencoding()
所以没有人修改defaultencoding。那为什么我的默认编码是'utf-8'?在
查找中的设置站点.py将影响默认编码。在
退房http://blog.ianbicking.org/illusive-setdefaultencoding.html
Edit site.py (in the standard library) directly. Seems like a bad idea. Though maybe I'll just delete the del sys.setdefaultencoding line... anyway, site.py might appear in other places on your computer as well (e.g., /etc/pythonX.Y/site.py).
查找中的设置站点.py将影响默认编码。在
退房http://blog.ianbicking.org/illusive-setdefaultencoding.html
相关问题 更多 >
编程相关推荐