UTF8 data import problem
Posted by: Peter Staunton
Date: August 16, 2007 07:11AM

Hi,

this may be a bug but I'm not sure - perhaps someone can spot what I'm doing wrong.

New UTF8 database with test table:
create table test (s varchar(64));

I can insert a string fine (note that the A in this string has a tilde accent ~)
insert into test values('OlomouckÃ?');

Now if I try to use LOAD DATA INFILE to import the exact same string, I get the following error:

Incorrect string value '\xC3\x0D' for column 's' at row 1.

Note that '\xC3' is the UTF8 code for the A with a tilde accent ~.

Here are my load commands below:
LOAD DATA INFILE 'string.txt'
INTO TABLE test
CHARACTER SET utf8

Got the same error with MYSQLIMPORT.

If I do a SHOW VARIABLES, I get:

character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8
character_sets_dir C:\apps\MySQL\MySQLServer\share\charsets\
collation_connection utf8_general_ci
collation_database utf8_general_ci
collation_server utf8_general_ci

Versions:
Server 5.0.45 Win32
Tools 5.0-r12 Win32

Any help would be really appreciated.

Many thanks,
Peter

Options: ReplyQuote


Subject
Views
Written By
Posted
UTF8 data import problem
12429
August 16, 2007 07:11AM
5129
August 16, 2007 11:03AM
7964
August 26, 2007 08:58PM
4960
August 27, 2007 12:41AM
5781
August 27, 2007 12:26PM
4613
September 03, 2007 02:11AM


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.