sys.setdefaultencoding('utf-8')在Python 2中存在令人沮丧的设置趋势.任何人都可以列出问题的真实例子吗?论证喜欢it is harmful或it hides bugs听起来不太令人信服.
sys.setdefaultencoding('utf-8')
it is harmful
it hides bugs
更新:请注意,这个问题只是关于utf-8,它不是关于改变默认编码"一般情况下".
utf-8
如果可以,请举一些代码示例.
python encoding utf-8 python-2.x
encoding ×1
python ×1
python-2.x ×1
utf-8 ×1