Every web programmer knows that UTF-8 is where it’s at these days. Even if you are coding something for only the US market, you’re still probably going to run into names, addresses, or whatever with accented characters.
Everyone knows that “all you have to do” is make your app speak UTF-8, set the character encoding in your web pages to UTF-8, and set your database encoding and collation to something like
utf8_unicode_ci, and you’re off and running… right?
Not quite. You’ve probably run into the situation where you hop into phpMyAdmin and edit some table row, and what to your wondering eyes should appear, but something like this:
Voici un article franÃ§ais.
Well, crap. That’s supposed to be a “ç” in “français”, not an “Ã§”!
And yet, when you view the web page and edit the content in your app, it looks and works fine! What’s going on here?
It’s really quite simple, and apparently something that no one bothers to mention: you have to tell your app to communicate with the database in UTF-8! Here’s how you do that in PHP and Rails…
In the case of WP MU, the best solution that I could find does include a plugin – but you can write it yourself in about 10 seconds. In writing the plugin yourself, you will also know how to maintain it yourself. Even if you don’t know much about PHP, this one’s a piece of cake!
So, here’s how to convince WordPress MU to play nice with the HTML in your posts…
So you’re merrily marching along, happy as a clam because you just set up a glorious new web site that uses, say, a PHP-based content management system like Joomla or WordPress running on a Unix or Linux server.
Everything is going well until suddenly, you start to get feedback from users that they can’t access certain pages or actions on your site. Worse yet, some people seem to be completely blocked from your site entirely.
The problem your users are seeing is a 500 Error, aka “Internal Server Error”. Most of the time, for most people, your site works great… But this is becoming a serious issue for some users.
What to do?