Python CMD 中文乱码处理

版权声明:本文为博主原创文章,转载请留言。 https://blog.csdn.net/root_miss/article/details/82217809

抬头加 #coding=utf-8

引入 import sys

type=sys.getfilesystemencoding()

然后给有中文输出的地方加上  .decode('utf-8').encode(type)

例如:

完成

猜你喜欢

转载自blog.csdn.net/root_miss/article/details/82217809