I swtiched back to Apache 2.2.14 and everything worked fine.
I did some comparison and found "AddDeafultCharset" was not set in Apache 2.4.20 so I added it in config file(s) but that didn't help.
I then compared the linked shared objects between Apache 2.2.14 and 2.4.20. I found libiconv.so.2 was not linked in Apache 2.4.20's httpd. So, I recompiled APR-UTIL to include iconv:
Code: Select all
./configure --with-apr=/usr/local/apr --with-iconv=/usr/local CFLAGS=-std=gnu99
make
make test
make install
Code: Select all
./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-cgi --enable-so --with-pcre=/usr/local --with-proxy --enable-dav --enable-modules=all
make
make install
However, it still doesn't work after restarting apache 2.4.20.
I used HTTP / HTTPS header check (http://www.webconfs.com/http-header-check.php) and found the charset is still set as UTF-8 no matter how I change in Apache config file(s).
After numerous tests, I finally got it to work! The following lines need to be added to config file (I added to <VirtualHost> in conf/extra/httpd-vhosts.conf):
Code: Select all
AddDefaultCharset big5
ForceType text/html
Also, even though I tested with the following meta tag in testing html files before today's config change and failed, some other virtual hosts without the above settings but with the following meta tag would show traditional Chinese just fine.
Code: Select all
<meta http-equiv="content-type" content="text/html; charset=Big5">