Changing the default character set
The default character on Joyent Shared Accelerators is UTF-8 (arguably the industry standard). In order to change it to another character set (e.g. to iso-8859-1) you should set the new character set in three places:
- Apache
- PHP (if used)
- MySQL (if used)
Apache
To set the new character set for Apache to iso-8859-1 (for example), put the following in an .htaccess file in the document root of your virtual server (~/web/public):
AddDefaultCharset iso-8859-1
PHP
To set the character set for PHP, you’ll need to edit your php.ini file and change the following line:
default_charset = "UTF-8"
to read:
default_charset = "ISO-8859-1"
assuming again that you want the ISO-8859-1 character set. See PHP configuration to see how to access and change the php.ini file directly (the Virtualmin interface doesn’t provide for character set changing - yet).
MySQL
To change the character set of a MySQL database, you’ll basically need to re-create the database anew with the new character set. If you have any existing contents in the database, you should dump it and import into the new one.