Re: [xsl] 16-bit chars rendered as "?" in UTF-8?

Subject: Re: [xsl] 16-bit chars rendered as "?" in UTF-8?
From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
Date: Tue, 14 Aug 2012 13:35:17 +0200
If changing the file's encoding specification fixed the problem you
must have some byte sequences representing codepoints in
UTF-8, possibly besides others represented as entities.

-W


On 14/08/2012, John English <john.foreign@xxxxxxxxx> wrote:
> On 13/08/2012 14:19, David Carlisle wrote:
>> Most likely reason is that either your input document or your result
>> document are being served with the wrong encoding. (ie the encoding in
>> the http header does not match the encoding in the file)
>
> Many thanks for this tip. The input was indeed ISO-8859-1 while the
> output was UTF-8. Changing the input encoding to UTF-8 fixed the
> problem. However, I still don't quite understand why this caused
> a problem, and if you have the time I'd be grateful for a brief
> explanation suited to a bear of vety little brain...
>
> A single piece of code loads a single stylesheet which is used to
> transform the input. In both case the input was encoded as ISO-8859-1
> using entities "&#nnnn;" to represent the 16-bit characters using 8-bit
> characters only. In both cases the output is UTF-8 (as defined in the
> stylesheet) but in one case the entities are transformed into the
> corresponding 16-bit characters "W" and so on, while in the other case
> they are transformed into question marks "?", character 0x3F. What I
> don't understand is why this should happen when both cases are dealt
> with by the same code and stylesheet?
>
> Again, many thanks,
> --
> John English

Current Thread