Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Errors Importing URF-8 CSV Files

PCHome's profile image PCHome posted 3 weeks ago in Import/Export Permalink

The files were created in LjbreOffice Calc and export options are limited there. I've done this many times before but now it won't import when selecting utf8: UTF-8 Unicode:

/ Warning (3719): 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. /

A popup says that the file was imported but the data is not there so it clearly did not import it.

If I select utf8mb4: UTF-8 Unicode, it tells be that either the File is empty, Wrong file encoding was selected or detected or Field and/or line terminator do not file the file contents. The file is the same format as prior files so how I can I get it imported?

PCHome's profile image PCHome posted 3 weeks ago Permalink

Sorry, typo in title and I see no way to correct it. It should be UTF-8 CSV Files.

ansgar's profile image ansgar posted 3 weeks ago Permalink

I think that utf8/utf8mb4 mismatch is not the cause - most characters already exist in MySQL's utf8 charset.

I suppose there must be errors due to a mismatch of the csv and table structure. Or you selected the wrong control characters.

Can you post the CREATE TABLE code and some lines of your csv file?

PCHome's profile image PCHome posted 3 weeks ago Permalink

Thank you and I agree. I found the problem late last night which was two-fold. First, the CSV had Linux line endings and the Import window was set for Windows line endings but also a couple of the rows of data had some breaks within them. This latter, I think, is a bug as the field was quoted so any returns within it should have been ignored. Replacing the returns within the lines to HTML breaks and converting the other line endings to the Windows type solved the problem. I know I could have simply adjusted the import box to use Linux line endings but for some reason I didn't think of that until it was imported.

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




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.