I need a plan for Unicode support in Mefeedia. Amazingly, PHP is rather bad in this regard. I’m using PHP and Mysql. Here’s a page that clearly shows the need for this.
So I have a question: what is the basic approach?
– Make sure stuff is stored in UTF-8 in MySQL?
– Make sure HTML uses UTF-8?
– What about the PHP part of the equation?
Any pointers to common sense around this are very welcome. Any good libraries?
Right now in the URL you mention I get: Content-Type: text/html when I should get Content-Type: text/html; charset=utf-8
You also need to check the http-equiv=”Content-Type” which is currently not set to utf-8
Make sure Apache is set to send everything as utf-8. you might want to add the following to .htaccess: AddCharset UTF-8 .php or this to your httpd.conf file: AddDefaultCharset UTF-8
I also have a bunch of links I reference here: http://del.icio.us/raster/unicode
Set the Header(“Content-Encoding: utf8”) will instruct the parser to enforce utf8. Wonky, I know, but the best way to do this.
erg, ignore last, it’s Content-Type: text/html;charset=UTF-8. PHP will parse the header and output as utf8.. again, not sure why no configuration setting for this.