📌  相关文章
📜  UnicodeEncodeError: 'latin-1' codec can't encode character '\u2013' in position 83: ordinal not in range(256) - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:17.134000             🧑  作者: Mango

代码示例1
>>> u'He said \u201CHello\u201D'.encode('iso-8859-1')
UnicodeEncodeError
>>> u'He said \u201CHello\u201D'.encode('cp1252')
'He said \x93Hello\x94'