【问题标题】:Can't load CSV File into MySql Workbench via Import Wizard无法通过导入向导将 CSV 文件加载到 MySql Workbench
【发布时间】:2019-03-18 12:39:27
【问题描述】:

当我尝试将此 CSV 加载到 MySQl DB 中时,出现以下错误。

Platz;Team;Saison;Spieltag;Punkte;Sieg;Unentschieden;Niederlage;Geschossen;Bekommen;Differenz;berUnter;HeimAuswrts;Gegner;Gegnertabellenposition_Vor_Spieltag;Gegner_Gegentore;Gegnertore

1;Borussia Dortmund;1819;1;3;1;0;0;4;1;3;1;H;RB Leipzig;6;4;1
2;FC Bayern Mnchen;1819;1;3;1;0;0;3;1;2;1;H;TSG 1899 Hoffenheim;3;3;1

我的 CSV 文件有什么问题?在 DB alle 字段中,只有 Team、HeimAuswrts 和 Gegner 的 datetype int 是 varchar。

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
ERROR: Import data file: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Failed

【问题讨论】:

    标签: mysql csv utf-8 ascii iso-8859-1


    【解决方案1】:

    古腾标签。您似乎正在加载包含德语字符的 CSV 数据,就好像它只包含 ASCII 字符一样。 ASCII 是电传打字机使用的古老的纯英文字符集。如果您想以 ASCII 码加载 München,则必须拼写为 Muenchen。

    但您应该尝试使用对世界更友好的字符集(如 utf-8)。在工作台导入向导的配置导入设置面板中,将编码设置为 utf-8(或者也可以设置为 iso-8859-1,也称为 latin-1)。

    【讨论】:

    • 我们在表上使用哪种 UTF-8 排序规则?大概有十几个。
    猜你喜欢
    • 2016-05-07
    • 2016-03-25
    • 2023-04-01
    • 2020-01-18
    • 2016-02-06
    • 2013-07-21
    • 2015-06-10
    • 1970-01-01
    • 2020-07-26
    相关资源
    最近更新 更多