MySQL Error: Unhandled exception: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

MySQL Error: Unhandled exception: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

我将 Google 表格工作簿下载为 CSV 文件,并尝试将其作为 table 导入到我的 MySQL Workbench 中,但我一直收到此错误...

未处理的异常:'ascii'编解码器无法解码位置 0 中的字节 0xef:序号不在范围内 (128)

我曾多次尝试以不同的方式导出 it/save 它,但没有任何效果。

如有任何帮助,我们将不胜感激!谢谢!

0xEF 值是您导出的 UTF-8 编码 CSV 文件中 byte order mark 的第一个字节。

导入文件时指定 UTF-8 文本编码而不是 ASCII 编码。

如果无法指定要使用的文本编码,请在导入前将文件转换为 ASCII。您可以使用大多数现代文本编辑器来做到这一点,例如 Notepad++. See its documentation regarding New document and Encoding menu.