Specify Character Set for HTML Output in SiteWorx

If you don't specify what character set to use when Apache outputs HTML content, it will use the default, which may, in some cases, make the characters look odd or some characters may be missing altogether. To avoid this problem, you can specify the character set to use in every HTML file or you can try to override everything and force Apache to use a global value.

This feature uses the AddDefaultCharset function of Apache. To understand more about how this feature works, read the documentation from Apache here.

Here is how you can make that change from within SiteWorx for a specific directory and everything inside it.

  1. Log into SiteWorx.
  2. In the Hosting Features area, select Htaccess.
    Select Htaccess from the Hosting Features Section
  3. Now you need to select where you want this character set to apply. If you want it to apply to your entire domain, select the appropriate directory from the list in the Global Directory Options section and click Edit.
    Click Edit Next to the Global Directory you Want to Specify the Default Character Set In
  4.  In the top section, select the Default Character Set button.
    Click the Default Character Set Button
  5. Start typing in the character set you want to use for files in this directory and SiteWorx will suggest options. Select the appropriate option from the drop-down list or finish typing the character set you want to use. Then click Save to apply the change immediately.
    Enter the Character Set you Want to Use and Click Save

Now HTML output from this directory (or directories inside this one) will use the character set you specified.

This feature only specifies the character set used for HTML body output. If the content of the page is pulled from a database that doesn't support that character set, then the output characters may still look odd since the database places the content into the page with the wrong character set to start.

For example, if you store UTF-8 characters in a database using latin1_swedish instead of UTF-8 for the table content, any characters that aren't supported by latin1_swedish won't be output correctly and this feature won't fix that.