Mysql Character set when loading data from file
If you get strange characters when loading data from a file using LOAD DATA INFILE, even if the character set of the DB or table is utf8, try this:
From https://stackoverflow.com/questions/26256421/sql-load-data-infile-utf8-issue
and https://stackoverflow.com/questions/4957900/loading-utf-8-encoded-text-into-mysql-table
LOAD DATA LOCAL INFILE '/path/pet.txt'
INTO TABLE pet
CHARACTER SET UTF8;
It worked for me...From https://stackoverflow.com/questions/26256421/sql-load-data-infile-utf8-issue
and https://stackoverflow.com/questions/4957900/loading-utf-8-encoded-text-into-mysql-table
Comments
Post a Comment