Python中将带有汉字的字符串转换为utf-8字符串
(2020-09-07 11:06:39)
标签:
汉字字符串utf-8 |
分类: Python |
str = 'abs 汉字,good!'
s = str.encode('unicode-escape').decode('utf-8')
print(s)
print(type(s))

加载中…