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

Do you want to know the details about “UnicodeEncodeError: 'latin-1' codec can't encode character '\u2013' in position 83: ordinal not in range(256)”. If yes, you’re in the correct article.

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

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

Final Words

I hope this article helps you to know about “UnicodeEncodeError: 'latin-1' codec can't encode character '\u2013' in position 83: ordinal not in range(256)”. If you have any doubts regarding this tutorial please let us know via the comment section. Share this post with your friends and family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment