首页 > 解决方案 > 如何在 python 中读取具有 UTF-16 LE 编码的文本文件?

问题描述

我尝试使用此代码显示 UnicodeDecodeError。

base_file =open(textfiles[i], encoding='utf-16-le')
text = base_file.read()

标签: python-3.x

解决方案


推荐阅读