Juraj Polak
Juraj Polak

Reputation: 67

SQL - LOAD DATA INFILE - UTF8 issue

I get few big database exported to .txt (its around 5GB each) so i found out that i can easy import it with

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

it works well but i am having problem with UTF-8 there, because some texts are displaying like PODB¦H Z L DODATELN¦ ZPRACOVAT even that column charset is set for UTF-8 and in .txt file its displayed OK, so problem is somewhere in import. Any idea how can i import it without this problems?

Upvotes: 4

Views: 7951

Answers (1)

ôkio
ôkio

Reputation: 1790

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

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

Upvotes: 6

Related Questions