首页 > 代码库 > UnicodeEncodeError: 'ascii' codec can't encode characters in position 820-823: ordinal not in range(128)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 820-823: ordinal not in range(128)

技术分享

真是奇怪了,在itermi里

print(data)

就能直接运行,而在sublime里,就非得写成这样

print(data.encode(utf-8))

 

UnicodeEncodeError: 'ascii' codec can't encode characters in position 820-823: ordinal not in range(128)