2

I have a stored procedure and it has a string parameter. When I call with word which contains some special chars like 'ş' or 'ğ' it returns Error Code: 1366. Incorrect string value: '\xC5\x9Fe' for column 'personalNames' at row 1 . But when I call with without this special chars everything is ok.

Here is my a part of my sp :

IF personalNames != '' THEN
    SET personalNames = LOWER(personalNames);
    SET @WherePart = CONCAT(@WherePart,' AND LOWER(per.Name) LIKE "%',personalNames,'%"');

Do you have any suggestion?

cagin
  • 5,772
  • 14
  • 74
  • 130

2 Answers2

3

My mistake was on the parameters. I changed my parameter to personalNames VARCHAR(200) character set utf8 and it solved.

cagin
  • 5,772
  • 14
  • 74
  • 130
0

the problem is in the charset of the Database. Change it to UTF-8. This can be done on the commandline if you start mysql-Server. The parameter is:

--default-character-set=UTF8

Regards Marc