首页 > 编程语言 >python 3.10 unicode \U 转中文

python 3.10 unicode \U 转中文

时间:2022-09-24 11:33:22浏览次数:50  
标签:中文 utf unicode python 3.10 str

python 3.10 unicode \U 转中文

`
str="\u574f\u86cb"
print(str.encode('utf-8').decode('unicode_escape'))

import json
cc = json.dumps(str).encode('utf-8').decode('unicode_escape')
print(cc)
`

标签:中文,utf,unicode,python,3.10,str
From: https://www.cnblogs.com/leeyong49/p/16725216.html

相关文章