Answers for "unicodeencodeerror 'latin-1' codec can't encode characters"

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 characters"

Python Answers by Framework

Browse Popular Code Answers by Language