Answers for "requests UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)"

1

UnicodeEncodeError: 'latin-1' codec can't encode character 'u2013' in position 83: ordinal not in range(256)

>>> u'He said u201CHellou201D'.encode('iso-8859-1')
UnicodeEncodeError
>>> u'He said u201CHellou201D'.encode('cp1252')
'He said x93Hellox94'
Posted by: Guest on July-09-2021

Code answers related to "requests UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)"

Python Answers by Framework

Browse Popular Code Answers by Language