While I set my Mysql database default character set as UTF-8, Zend_Db_Adapter does not pick up the setting. Zend_Db write to Mysql using its own default character set (I guess it’s ISO-8859-1), unless it is specifically told by
我发现 Resin (Web Server) 和 Chrome (Browser) 竟然使用相同的 Widows 任务栏图标。Is Resin project sponsored by Google? Is GWS (Google Web Server) based on Resin? It’s just my guess. Resin does not say anything about Google on its site.
When I tried to search the relationship between Resin and Chrome, I found Resin and Chrome is a kind of storage basket. But it’s difficult to describe resin and chrome in Chinese – 带支架的藤条箱? Maybe.
However, if you search Resin and Chrome in Google Image Search, nothing like 带支架的藤条箱 show up in first 2 pages. So, what is Resin and Chrome?
I don’t like the way of Actinic tackle the problem. For example, if the web server set default charset as UTF-8, it will cause page rendering issue for Actinic. Especially for the pound sign. All the support knowledge from Actinic is redirecting people set the server using default chareset as ISO-8859-1. Then, my question is – why should I use ISO-8859-1 while UTF-8 has far better applicability, especially for multi-national sites?
Nevertheless, can Actinic generate an UTF-8 encoded site? The answer is yes and no.
Yes is because I have already achieved it; No is because Actinic can not make it happen for you (at least I won’t know how to control it), so you must do something outside Actinic. Here below is my detailed steps.
First, rewrite all requests to actinic generated files to index.php.
Second, create a bootscript, name it as index.php. This idea is inspired by Zend Framework. Make sure:
The bootscript should be in utf-8 encode.
The bootscript should be able to include actinic generate files according to request uri.
Third, in actinic templates, change meta tag charset to utf-8.
Last, at web server, adddefaultcharset utf-8.
The most tricky part is actinic upload its files in iso-8859-1 encoding, but bootscript is utf-8 encoded. A normal include or require by php will not render pound sign correctly. I use output buffer to hack the problem.