小编use*_*113的帖子

python中的中文和日文字符支持

如何正确阅读日文和中文字符.我正在使用python 2.5.输出显示为"E:\Test\?????????"

path = r"E:\Test\?????????"
t = path.encode()
print t
u = path.decode()
print u
t = path.encode("utf-8")
print t
t = path.decode("utf-8")
print t
Run Code Online (Sandbox Code Playgroud)

python python-2.5

6
推荐指数
3
解决办法
4万
查看次数

标签 统计

python ×1

python-2.5 ×1