June 16, 2004

Browsers, mod_rewrite, SSI, XHTML, MathML, UTF-8 and ISO-8859-1 all continue to conspire against me, ensuring that my life is as hard as possible.

Once upon a time (today in fact), Firefox started complaining about what I thought was <?xml version="1.0" encoding="ISO-8859-1"?>. I tried using that XML processing instruction because Firefox apparently doesn't fetch the AddCharset directive sent from my .htaccess file, and assumed UTF-8 as the default character encoding. This was when the moaning started. I had no idea why it started moaning, but apparently it doesn't like white-space before either a DTD or an XML processing instruction. Fine, I can accept that. Then, upon some pondering, I realized that I needed to put my SSI directive <!--#include --> before all my variables so that the white-space would disappear. The white-space disappeared, Firefox doesn't complain, and it gets ISO-8859-1 like it should. However, since the variables aren't passed to the included files, you'll see "Håvard's Homepage - (none)", followed by "(none)". I've decided that you're going to have to live with that until I collect enough courage to switch to PHP.

I amaze myself sometimes... Problem fixed. It's as simple as to just add the XML processing instruction at the very top of every page, instead of only in the included one.

<< | Previous entry (June 15, 2004) | Next entry (June 22, 2004) | >>
Back to Archive