我正在试着打印这个角色維 在Jupyter笔记本中。我可以用下面的代码来做
w = '\xe7\xb6\xad'
print( bytes(w, encoding='raw-unicode-escape').decode('utf-8') )
但是,我只有字符串z
,其中
z = '\\xe7\\xb6\\xad'
从其他问题开始,我尝试了以下解决方案
print( bytes(z, encoding='raw-unicode-escape').decode('utf-8') )
print( z.encode('utf-8').decode('unicode_escape') )
import codecs
u = codecs.decode(z, 'raw-unicode-escape').encode('utf-8')
print(u)
print( str(u.decode('utf-8')) )
bytes( str(u.decode('utf-8')), encoding='raw-unicode-escape').decode('utf-8')
没有指纹維.
如何打印維 如果我只从z
开始
我找到了一条路
相关问题 更多 >
编程相关推荐