Answers for "UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 478232: 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 "UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 478232: ordinal not in range(256)"

Python Answers by Framework

Browse Popular Code Answers by Language