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:
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

Popular posts from this blog

Add GitHub Repository to DBeaver CE Secured with SSH Protocol

Keyboard Shortcut to "Toggle Line Comments" in DBeaver

DBeaver Shortcuts