python 2.7 listdir读取中文目录乱码

问题描述 在用 os.listdir(source_path) 遍历文件目录时,发现若文件目录有中文的话可能会出现相似于 '������' 的乱码html 解决方法 使用 unicode 处理 具体代码 os.listdir(unicode(source_path", 'utf-8'))web 参考文章 http://www.javashuo.com/article/p-rmigmgqr-bx.h
相关文章
相关标签/搜索