Hey guys,

I'm having a major character encoding issue. I have a bunch of internationalized text in a MySQL 5 database. The database and table character encoding is set to utf8/utf8_unicode_ci. All pages output a utf8 encoding header. I loaded the data from a utf8 CSV file using LOAD DATA.

I believe the data in the DB is encoded incorrectly. Some of the records display properly, and others do not, which appears to be reversed depending on whether I launch mysql with the --default-character-set=latin1 or utf8 options. I want all everything to be in UTF8, but I'm not sure how to convert the latin1 encoded data (if it even is) to true UTF8 without messing up the already-utf8-encoded data.

With utf8:

mysql> select school.design_enhances_learning_narrative from school where school.design_enhances_learning_narrative like '%roofing%'\G
*************************** 1. row ***************************
design_enhances_learning_narrative: ... include: <br /><br />• Future Proofing: ... • First Impressions:

mysql> select school.design_enhances_learning_narrative from school where school.design_enhances_learning_narrative like '%with a heart%'\G
*************************** 1. row ***************************
design_enhances_learning_narrative: A school with a heart<br /><br />... we didnt choose ...


With latin1:

mysql> select school.design_enhances_learning_narrative from school where school.design_enhances_learning_narrative like '%roofing%'\G
*************************** 1. row ***************************
design_enhances_learning_narrative: ... include: <br /><br /> Future Proofing: ... First Impressions:

mysql> select school.design_enhances_learning_narrative from school where school.design_enhances_learning_narrative like '%with a heart%'\G
*************************** 1. row ***************************
design_enhances_learning_narrative: A school with a heart<br /><br />... we didn?t choose ...


The results flipflop for about half my data depending on my client encoding. Any ideas? Need to fix this ASAP. Thanks.