MySQL Forums
Forum List  »  General

load data infile: "Incorrect string value" with special chars
Posted by: Danny Stommen
Date: November 17, 2011 10:35AM

Hi,

I'm having problems with loading a file into the database due to special chars: €, â.

The error I receive is the following:
Incorrect string value: '\xE2n - G...' for column 'Name' at row 77

My table definition:
CREATE TABLE `apps_mark_mini`.`taxonomy_temp` (
`Id` int(10) unsigned NOT NULL COMMENT 'De id (determined by Mark&Mini)',
`TaxonomyGroup` varchar(255) NOT NULL COMMENT 'taxonomy_group name',
`Name` varchar(255) NOT NULL COMMENT 'unique name on group id level',
`DdmsHeader` varchar(255) NOT NULL COMMENT 'Mark&Mini header',
`DdmsValue` varchar(45) NOT NULL COMMENT 'Mark&Mini value',
`BronClicks` tinyint(3) unsigned NOT NULL COMMENT 'Mark&Mini data',
`BronPcData` tinyint(1) NOT NULL COMMENT 'Mark&Mini data',
`Pricing` decimal(4,2) NOT NULL COMMENT 'CPM price in EUR',
`UpdatedTime` datetime NOT NULL COMMENT 'Time of last update',
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

And my query:
LOAD DATA LOCAL INFILE 'somefile'
REPLACE INTO TABLE taxonomy_temp
CHARACTER SET utf8
FIELDS TERMINATED BY ','
IGNORE 1 LINES (Id, TaxonomyGroup, Name, DdmsHeader, DdmsValue, BronClicks, BronPcData, Pricing);

The database's character set is utf8. For the table as well.

Any idea how to solve this?

Options: ReplyQuote


Subject
Written By
Posted
load data infile: "Incorrect string value" with special chars
November 17, 2011 10:35AM


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.