Forum

Default encoding

Coviti
19 September 2007, 01:52
I'm using Hiawatha 5.12 on Debian etch, and I'd like to find a way to set Hiawatha's default character encoding to utf-8 (either globally or for a specific virtual host). I know I could do this in Apache with AddDefaultCharset, but I can't seem to find anything about charsets in the Hiawatha man page. Have I missed something, or is there indeed no way to set Hiawatha's default charset?
Hugo Leisink
19 September 2007, 10:23
I must admit that I never had any idea about the use of AddDefaultCharset. In fact, I always set it to 'Off', otherwise my pages got messed up. You can specify a charset in a META tag in the document.

Is it true that this option in Apache does nothing more that only adding the charset to the Content-Type HTTP header? If that's the case, then it is really easy for me to implement it in Hiawatha.
Coviti
20 September 2007, 00:02
I always found the use of AddDefaultCharset much easier than adding a meta tag in every document (on large sites that gets to be a lot of redundant code). Just a personal preference I guess.

Apache's AddDefaultCharset does add the charset to the Content-Type header if it doesn't exist, but it also overrides the charset specified in the meta tags for every applicable document.
This topic has been closed.