-2

I have latin1 MySQL database and it is too late to convert it to utf8.
When I search for text that contains (French letter for example), I get same result with English letter.
Example: when I search for "tést", I get "test" from MySQL.
How can I avoid this?
Thank you.

Muhammad Arif
  • 1,014
  • 3
  • 22
  • 56
Houranis
  • 361
  • 2
  • 4
  • 16

1 Answers1

0

The COLLATION latin1_general_ci will find test when searching for tést. Since that is probably what your collation is (let's see SHOW CREATE TABLE), that is no efficient way to avoid getting test.

If all you have is Western European characters, utf8 is not a critical goal.

To change the table foo to that collation:

ALTER TABLE foo CONVERT TO CHARACTER SET latin1 COLLATE latin1_bin;

Since it will involve copying the entire table, it will take some time.

Rick James
  • 135,179
  • 13
  • 127
  • 222