Answers for "'latin-1' codec can't encode character '\u2003' in position 4064: ordinal not in range(256) 177"

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 "'latin-1' codec can't encode character '\u2003' in position 4064: ordinal not in range(256) 177"

Python Answers by Framework

Browse Popular Code Answers by Language