MySQL Forums :: General :: load data infile: "Incorrect string value" with special chars


Advanced Search

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 Danny Stommen 11/17/2011 10:35AM
Re: load data infile: "Incorrect string value" with special chars Rick James 11/18/2011 08:40AM
Re: load data infile: "Incorrect string value" with special chars Danny Stommen 11/21/2011 02:19AM
Re: load data infile: "Incorrect string value" with special chars Rick James 11/21/2011 11:40PM


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.