小编Gio*_*dze的帖子

How to convert unicode string into normal text in python

Consider I have a Unicode string (Not the real unicode but the string that looks like unicode). and I want to get it's utf-8 variant. How can I do it in Python? For example If I have String like:

title = "\\u10d8\\u10e1\\u10e0\\u10d0\\u10d4\\u10da\\u10d8 == \\u10d8\\u10d4\\u10e0\\u10e3\\u10e1\\u10d0\\u10da\\u10d8\\u10db\\u10d8"
Run Code Online (Sandbox Code Playgroud)

How Can I do it so that I get its utf-8 variant (Georgian symbols):

??????? == ??????????

To say it simply I want to Have code like:

title = "\\u10d8\\u10e1\\u10e0\\u10d0\\u10d4\\u10da\\u10d8 == \\u10d8\\u10d4\\u10e0\\u10e3\\u10e1\\u10d0\\u10da\\u10d8\\u10db\\u10d8"
utfTitle = title.TurnToUTF()
print(utfTitle) …
Run Code Online (Sandbox Code Playgroud)

python string unicode encoding utf-8

3
推荐指数
2
解决办法
9039
查看次数

标签 统计

encoding ×1

python ×1

string ×1

unicode ×1

utf-8 ×1