Reputation: 4915
I am trying to import a dataset with korean characters in, saved as unicode encoding using CSV LOAD DATA
even when I set the input character set to utf8 the korean get's mangled
the encoding for that column is of course utf8
sample record (tab delimited):
79 읽다 read NULL
what goes into MYSQL:
79 ì½ë‹¤ read NULL
Upvotes: 3
Views: 8113
Reputation: 1577
here is an example: LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES;
http://dev.mysql.com/doc/refman/5.0/en/load-data.html
Upvotes: 0
Reputation: 31
It seems like phpmyadmin ignores the select drop-down, and does not append the CHARACTER SET utf8 clause to the query.
You can manually execute the query that phpMyAdmin should, however. Try this:
LOAD DATA LOCAL INFILE 'e:\\www\\wro11.csv' INTO TABLE `videos` CHARACTER SET utf8 FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n'
Upvotes: 3
Reputation: 32296
load data supports character set clause
load data local infile 'filename.txt' into table test.unicode CHARACTER SET utf8
Use it from the command line if phpmyadmin ignores it.
Upvotes: 3