Answer the question
In order to leave comments, you need to log in
How to decode unicode to UTF-8 python3?
How do I decode unicode to UTF-8?
I can’t understand in any way, can I write a ready-made method or function?
PS I have UNICODE written in the string and I need to decrypt it in UTF-8.
In python 2 there was a decode function, but in 3 I did not see anything like that.
Unicode is written as plain text to a variable.
Answer the question
In order to leave comments, you need to log in
s = '''\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043e\u0444\u0438\u0441\u044b:
- \u041a\u0438\u0435\u0432, \u041a\u0438\u0435\u0432 \u0443\u043b.\u041c\u0435\u0442\u0430\u043b\u043b\u0438\u0441\u0442\u043e\u0432'''
print(s.encode().decode())
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question