ContentType

Summary: How to change PmWiki's default charset or Content-type
Version:
Prerequisites:
Status:
Maintainer: Pm
Discussion: ContentType-Talk
Categories: Layout, International

Question

How can I change PmWiki's default charset or Content-type?

Answer

The content-type that PmWiki uses defaults to "Content-type: text/html; charset=iso-8859-1;" for a variety of reasons. However, a wiki administrator can change the default content type or charset type by adding an entry to $HTTPHeaders in local/config.php. For example, to change the content type to text/xml, the administrator can do:

    $HTTPHeaders[] = 'Content-type: text/xml';

Or, to change the charset to iso-8859-5:

    $HTTPHeaders[] = 'Content-type: text/html; charset=iso-8859-5;';

Note that changing the header generally means that the <!DOCTYPE ...> and other header declarations in the layout template should be changed to match.

See Also

Contributors

  • Pm, 18-Oct-2004

Comments

See discussion at ContentType-Talk