MySQL Forums
Forum List  »  Newbie

MySQL errs on loading data with Micron character (µ)
Posted by: The Sanctioner
Date: July 16, 2017 04:04PM

Hello,

I'm having trouble inserting data with a µ character. The data contains µm as a unit of measure. the error is:

Error Code: 1300. Invalid utf8 character string: '"'

using the hex value of the " in the error message says it's a regular keyboard character double apostrophe, but there isn't any in the file, outside of the field qualifier. i verified there are no extra " besides the field qualifier.

i'm also curious why it points to a " instead of the µ.

I am using default utf8 with default collation on an InnoDB table. but the ascii code is only Dec# 188, within the lower 255 set, so I don't understand why it can't accept it.

I tried Varchar and Varbinary for that field, but nothing works.

my.ini file has:
default-character-set=utf8
character-set-server=utf8

the command i'm using is:

LOAD DATA INFILE 'C:/ProgramData/MySQL/MySQL Server 5.7/Uploads/NUTR_DEF.txt'
INTO TABLE ard_health_nutr_def
FIELDS TERMINATED BY '~' ENCLOSED BY '"' ESCAPED BY '"'
LINES TERMINATED BY '\r\n'
(Nutr_No, Units, Tagname, NutrDesc, Num_Dec, SR_Order)
;

the command fails without inserting any rows.
the MySql import wizard inserts up to the row before the µ and fails at the first row with this in it.

i'm considering converting them to µ since it's being used on the web, but thats not a scalable solution. Since it's a pretty basic character, is there a way to get MySql to accept it?

win7
mysql5.7

thanks,

-Sanc

Options: ReplyQuote


Subject
Written By
Posted
MySQL errs on loading data with Micron character (µ)
July 16, 2017 04:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.