How can I print ’
(unicode u2019) in python exactly as ’
? Note: I know that if I do print(text_bytes)
that I get b'’'
, this is not what i want, just ’
. Using python version 3.5.3 on Windows 10.
Code:
text = '’'
text_bytes = text.encode('utf-8')
text_str = str(text_bytes, 'utf-8')
print(text_str)
Result:
File "C:\Python\Python35\lib\encodings\cp850.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2019' in position 0: character maps to <undefined>