SQL - LOAD DATA INFILE - UTF8 Issue

I am getting several large databases exported to .txt (about 5GB each), so I found out I can import it easily with

LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet;

it works well, but i have a problem with UTF-8 there because some texts are displayed as PODBÂ | HZL DODATELN || ZPRACOVAT, even this column encoding is set to UTF-8 and in the .txt file displayed OK, so the problem is somewhere in the import. Any idea how I can import it without these problems?

+3


source to share


1 answer


I found this: Loading utf-8 encoded text into MySQL table



LOAD DATA LOCAL INFILE '/path/pet.txt' 
INTO TABLE pet
CHARACTER SET UTF8;

      

+4


source







All Articles