I’m having a problem with matching against french accented characters (note that other different characters such as chinese, japanese will also be used).
I’ve ran across an error when I input a french street name that will check the database and I had an error:
Incorrect string value: '\xE2teau' for column 'street_name' at row 1
For this character in this name:
Le Château
I’ve changed my column to utf8_general_ci and it still throws me that error. How can you “decode” them to match against a column?
Are you actually sending UTF-8 data, or are you sending Latin-1 encoded data? MySQL may be choking on
âtebecauseâis being transmitted as the byteE2and it expects a byte with a suitable value to come next, but sees the74fortinstead. Thus the string is not valid UTF-8.Try using
utf8_encode()on the string value before creating the query?