Dec 6 2009

Learning from your mistakes: mixed character sets in MySQL

Character sets are a big thing these days and luckily we’re slowly evolving to a world where UTF-8 rules. In the meanwhile we’re stuck in a transitional phase where the ISO-8859-1 encoding is still used.

MySQL followed this trend and introduced character set support in version 4.1. Importing data from older versions is easy and SET NAMES ‘utf8′ is quite useful to ensure special characters are correctly encoded in the new databases.

But I learned first hand that the SET NAMES ‘utf8 trick is not a cure for every disease.
Continue reading