Re: UTF8 data import problem
Posted by: Donal Lynch
Date: August 27, 2007 12:26PM

> Incorrect string value: 'Agnetha F\xE4ltskog' for
> column 'artistname' at row 1
> ...
> I've tried every different combination of
> character set for the columns in the destination
> MySQL table...

The destination column charset probably isn't the problem, as long as it can hold the range of characters in the source data. The thing Mysql needs to know correctly is what encoding the source data is in, for example by using a CHARACTER SET xxx clause as part of the LOAD DATA INFILE statement. Otherwise it uses a default, which might be wrong... for example the error message above could be because it's trying to read utf8 but the data is latin1. See http://dev.mysql.com/doc/refman/5.0/en/load-data.html

Another thing... I'm not familiar with the tool you're using, but the mechanism it's using must be to dump the data from the source system into a file or stream that's then imported into mysql, so both sides of that transfer need to have the same understanding about encoding. Is there some way to configure the tool explicitly to dump in charset xxx and then to pair that with an explicit LOAD DATA INFILE ... CHARACTER SET xxx on the mysql side... this would mean it won't break when one side or another has different defaults.



Edited 1 time(s). Last edit at 08/27/2007 12:40PM by Donal Lynch.

Options: ReplyQuote


Subject
Views
Written By
Posted
12444
August 16, 2007 07:11AM
5142
August 16, 2007 11:03AM
7973
August 26, 2007 08:58PM
4979
August 27, 2007 12:41AM
Re: UTF8 data import problem
5799
August 27, 2007 12:26PM
4626
September 03, 2007 02:11AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.