How to decode a string from UTF-8 in Python

1 Answer

0 votes
s = "Python åäö"
 
utf8 = s.encode()
 
print(utf8)


print(utf8.decode())



'''
run:

b'Python \xc3\xa5\xc3\xa4\xc3\xb6'
Python åäö

'''

 



answered Aug 8, 2020 by avibootz

Related questions

...