[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Encoding problem or what else?


Subject: Re: [xsl] Encoding problem or what else?
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Wed, 07 Dec 2005 19:22:37 +0100

Hi Flavio,

I expected this from your first post. The three bytes are the (optional) UTF-8 Byte Order Mark (BOM). The XML Parser that is used by your XSL processor does not consume them as it should, resulting in character data in the prolog, which is obviously not allowed.

It is typical of Microsoft products to use this BOM. Wordpad adds it at save time and consumes it at reading time, so you will never see it in that editor. Switch to a different (XML) parser, get rid of the BOM in your data (can you influence the creation?) or patch the reading process to consume this BOM.

Second option is perhaps easiest.

Regards,
Geert

Hello Micheal,
i checked the file with an HEX editor and it turned out that there are three
bytes whose hex code is EF BB BF at the beginning of the o ffendingfile.
I guess this must be the reason why the parser is complaining, though I am
still not clear if this is some sort of multi-byte character or just some
junk that happens to be there. If I open the file with Wordpad, these
characters do not show up at all.

Thanks,
Flavio


Current Thread
Keywords