错误代码:
str = '张三'
res = str.decode('utf-8')
print(res)
正确代码:
str = '张三'
res = str.encode('utf-8').decode('utf-8')
print(res)
错误代码:
str = '张三'
res = str.decode('utf-8')
print(res)
正确代码:
str = '张三'
res = str.encode('utf-8').decode('utf-8')
print(res)