当我尝试将此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文件怎么了?在数据库中,alle字段的日期类型为int,仅Team,HeimAuswrts和Gegner为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

最佳答案

Guten标签。您似乎正在加载包含德语字符的CSV数据,就好像它仅包含ASCII字符一样。 ASCII是电传打字机使用的古老的仅英语字符集。如果要使用ASCII加载慕尼黑,则必须将其拼写为慕尼黑。

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

10-04 21:06
查看更多