1

I have a utf-8_general_ci column. When I insert a column via "INSERT INTO mytable (column) value ('MÃLL')" everything is fine and the row gets inserted.

I am trying to do bulk inserts with the infile command, but it fails on the non-ascii characters and cuts the name off...the value in the database ends up being 'M' rather than 'MÃLL'

The text file I am loading from has the correct value. Here is my statement:

LOAD DATA INFILE 'file.txt' IGNORE INTO table mytable FIELDS TERMINATED BY '$' ESCAPED BY '' LINES TERMINATED BY '\n' (column)

I get the following warning: Warning: Incorrect string value: '\xC3O ...' for column 'column' at row 1

How do I load this file correctly?

user_78361084
  • 3,538
  • 22
  • 85
  • 147

0 Answers0