python-3.x - 如何在 python 中读取具有 UTF-16 LE 编码的文本文件?
问题描述
我尝试使用此代码显示 UnicodeDecodeError。
base_file =open(textfiles[i], encoding='utf-16-le')
text = base_file.read()
解决方案
推荐阅读
- sql - string_split 的另一种方法
- c# - 特定项目的 Mapster.Tool 代码生成
- php - PHP PDO查询试图从值创建子数组
- c# - Task 尚未开始执行时没有创建工作线程?
- javascript - 检查水平溢出的元素是否不再可滚动
- python - 来自同一文本文件 Python 的两个单独的整数列表
- javascript - 将html画布放在页面的左上角
- react-native - React Native:更改 TouchableOpacity 一个角的颜色
- android-studio - 如何在手持应用端为 WearOS 扩展 WearableListenerService
- php - 如何使用 php 和 mysql 创建顶级捐助者列表?