Bug in CSV import?

[expired user #10091]'s profile image [expired user #10091] posted 8 years ago in Import/Export Permalink

Hi everyone, I am new to the forum. so, a quick introduction, my name is frank, a musician/music teacher and webmaster from Slough, England.

I use HeidiSQL 9.3.0.5116 64-bit on Windows 10, and I am mostly happy with it. However, the one thing that keeps giving me trouble is the import CSV feature.

I have tried a number of settings, and the closest I have got is importing a simple comma delimited CSV file, with the settings in Heidi as in the first screenshot.

That works reasonably well, but I keep getting an error message as follows:

/* 2016-09-09 16:44:31 [] */ /* 2 rows imported in 0.141 seconds. */
/* 2016-09-09 16:44:31 [IFastNet] */ SHOW WARNINGS;
/* 2016-09-09 16:44:31 [] */ /* Warning (1366): Incorrect string value: '\xEF\xBB\xBF' for column 'Lied' at row 1 */
/* 2016-09-09 16:44:31 [] */ /* Warning (1366): Incorrect integer value: 'Frank Valentino' for column 'Stemmen' at row 1 */
/* 2016-09-09 16:44:31 [] */ /* Warning (1366): Incorrect integer value: 'Frank Valentino' for column 'Stemmen' at row 2 */
/* 2016-09-09 16:44:49 [IFastNet] */ SELECT * FROM `jingleko_reloader`.`stemming` LIMIT 100000;
/* 2016-09-09 16:44:49 [IFastNet] */ SHOW CREATE TABLE `jingleko_reloader`.`stemming`;
/* 2016-09-09 16:45:08 [IFastNet] */ UPDATE `jingleko_reloader`.`stemming` SET `Lied`='Frank Valentino' WHERE  `Nr`=5753;
/* 2016-09-09 16:45:08 [IFastNet] */ SELECT `Nr`, `Lied`, `Artiest`, `Stemmen` FROM `jingleko_reloader`.`stemming` WHERE  `Nr`=5753;
/* 2016-09-09 16:45:35 [IFastNet] */ UPDATE `jingleko_reloader`.`stemming` SET `Lied`='Ik geef m\'n leven aan jou', `Artiest`='Frank Valentino' WHERE  `Nr`=5753;
/* 2016-09-09 16:45:35 [IFastNet] */ SELECT `Nr`, `Lied`, `Artiest`, `Stemmen` FROM `jingleko_reloader`.`stemming` WHERE  `Nr`=5753;
/* 2016-09-09 16:45:40 [IFastNet] */ UPDATE `jingleko_reloader`.`stemming` SET `Artiest`='Frank Valentino' WHERE  `Nr`=5754;
/* 2016-09-09 16:45:41 [IFastNet] */ SELECT `Nr`, `Lied`, `Artiest`, `Stemmen` FROM `jingleko_reloader`.`stemming` WHERE  `Nr`=5754;
/* 2016-09-09 16:46:00 [IFastNet] */ UPDATE `jingleko_reloader`.`stemming` SET `Lied`='Mijn hart is vrij' WHERE  `Nr`=5754;
/* 2016-09-09 16:46:00 [IFastNet] */ SELECT `Nr`, `Lied`, `Artiest`, `Stemmen` FROM `jingleko_reloader`.`stemming` WHERE  `Nr`=5754;

I have no idea where that "incorrect integer value" comes from, and when the data are imported, everything seems to be in place, except for the fact that there is always a question mark in front of my first import in the database.

Has anyone experienced that before, or even better, has anyone got a solution?

Thank you in advance. PS. I have also attached the CSV file, as you can see, it is a simple comma delimited file with nothing but 2 rows in it and 2 items per row.

2 attachment(s):
ansgar's profile image ansgar posted 8 years ago Permalink

Notepad++ says your .txt file is encoded as UTF8 with BOM. So the question mark you see is most probably the BOM (byte order mark). HeidiSQL has problems when reading such encoded text files. You should save it again in UTF8 without BOM and try the import again.

[expired user #10091]'s profile image [expired user #10091] posted 8 years ago Permalink

OK, thank you. I shall give that a try and let you know. Apart from that I quite like Heidi.

[expired user #10091]'s profile image [expired user #10091] posted 8 years ago Permalink

Great!!!! That solved the problem. Thank you ever so much.

Please login to leave a reply, or register at first.