Reputation: 105210
I'm trying to print a utf-8 character to console.
Isn't this supposed to work?
Upvotes: 2
Views: 87
Reputation: 5666
The former statement prints the value as bytes
while the latter statement uses a string
value. Changing it to bytes
will give you the required output.
>>> b'\xc3\x91'.decode()
>>> 'Ñ'
Upvotes: 1