xsl-list
[Top] [All Lists]

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

2012-08-14 06:35:35
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(_dot_)foreign(_at_)gmail(_dot_)com> 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 "א" 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--