Web lists-archives.com

Re: characters oddity

On 3/2/2016 11:29 AM, McGranahan, Jamen wrote:
Have two virtual machines, both running RedHat 7. Both are also running MySQL 5.6.29 and both have the same data. We have two databases, however, that keep throwing odd characters on one system but it's OK on the other and we've not been able to figure out why.

What it should look like (from the test machine, pointing to the database on the test machine):
Décimas a la censura de Carmen Aristegui
Guillermo Velázquez Benavidez

What it looks like on our Production database (from the test machine, pointing to the production database):
Décimas a la censura de Carmen Aristegui
Guillermo Velázquez Benavidez

We have verified the my.cnf is the same on both machines, using utf8 as the default character set. We have also verified the character sets for the databases and tables are identical. We know it has to be something with the MySQL database on our Production server because we can point Production to the Test database and it the characters are translated correctly. But we just haven't been able to figure out what it is - and it's been 48 hours worth of work and investigation. Any advice, guidance, or suggestions would be greatly appreciated!  Thank you!

Jamen McGranahan
Systems Services Librarian
Vanderbilt University LIbrary
Central Library
Room 811
419 21st Avenue South
Nashville, TN 37214

Looks like one of your clients is not recognizing the data as part of a multi-byte character sets or that the data was loaded into the second (production) system after being transcoded via a single-byte character set or that your display terminal is not using the right code page to show you the correct characters (less likely since you are using the same client on the same machine).

If you compare the HEX() of both fields on both systems, do they match? If so then it's a client-side translation error. If they do not match, then you introduced the extra characters during the dump/restore process. The "é" is what the "é" would look like if you were reading it in latin1.

Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Integrated Cloud Applications & Platform Services
Office: Blountville, TN

Become certified in MySQL! Visit https://www.mysql.com/certification/ for details.

MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql