2 ms·
MySQL has caused so much pain with their decision to make latin1 the default encoding. I've seen so many PHP apps that store UTF-8 encoded text in Latin1 field
by jakobegger 9y ago
MySQL has caused so much pain with their decision to make latin1 the default encoding.
I've seen so many PHP apps that store UTF-8 encoded text in Latin1 fields, and it kind of works, until you correctly configure your client library, or try sorting the data, or check for equality...
The problem is so common, that the popular MySQL client app Sequel Pro even has an option to set the encoding to "UTF8 via Latin1", which tells the server to output Latin1 but then treats the result as UTF-8.
So once you learned this the hard way, you'll change the db encoding to utf8, and you'll be glad to have finally fixed the encoding mess, only to stumble across the fact from the original article that utf8 is not really utf8 in MySQL --- oh the horror!