问题描述 在用 os.listdir(source_path) 遍历文件目录时,发现若文件目录有中文的话可能会出现类似于 '������' 的乱码 解决方法 使用 unicode 处理 具体代码 os.listdir(unicode(source_path", 'utf-8')) 参考文章 https://www.cnblogs.com/RoundGirl/p/5046640.html