Re: ERROR 1366 (HY000): Incorrect string value: '\x9B'
Posted by: Rick James
Date: May 07, 2011 11:29PM

mysql> select lastname, hex(lastname), char(lastname), char_length(lastname) from user;
-->
mysql> select lastname, hex(lastname), LENGTH(lastname), char_length(lastname) from user;
And, let's see all the rows. The interesting one is the one with the o-slash.

\x9B -- This sounds like latin1. Which says to me that
mysql> insert into user values('0000', 'a', 'a', 'a', 'ΓΈ');
was entered in latin1 instead of utf8.

Are you on Windows? Have you done
chcp 65001?

If you are on Unix, do you have a utf8-savvy terminal program?

If you can't get the 'terminal' to talk utf8, then do this:
SET NAMES latin1;
That should let the \x9B in, because it will be transcoded from latin1 to utf8 as it goes to mysqld.

Sounds like you have already gotten into this:
http://mysql.rjweb.org/doc.php/charcoll

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: ERROR 1366 (HY000): Incorrect string value: '\x9B'
18244
May 07, 2011 11:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.