Blosxom and UTF8

A few days ago I installed Blosxom to store my university notes which I write in Markdown and in German language, and which are UTF8 encoded. But I couldn’t get Blosxom to not screw up the encoding even if I set the correct Content-Type Header in HTML. It turned out that you need to modify the line which says something like

$header = {-type=>$content_type}; # Around line 280

to this

$header = {-type=>$content_type, -charset=>'utf8-'};

This tells the Perl CGI module to send the correct HTTP encoding headers for your document. You should also add

to your HTML Head section (which you can find around line 430 if you are using the default template.

And voila, the multibyte characters aren’t screwed up anymore :)

Note: This fix does not work for static file generation in Blosxom, only for dynamic mode.