RE: [xsl] ÅÄÖåäö commes out as ??

Subject: RE: [xsl] ÅÄÖåäö commes out as ??
From: "Niklas Holmberg" <Niklas.Holmberg@xxxxxxxxx>
Date: Fri, 9 Jun 2006 13:07:12 +0200
Hmm ok, but if i add that argument and call it with the same encoding that
i've specified for output it will work?

If i want utf-8 output i specify it in the xsl file and call the
transformation with:
./xmlxslt.sh /home/niho/words.xml /home/niho/words.xsl UTF-8 >
/home/niho/words.html

And for ISO-8859-1 i specify it in the xsl file and call the transformation
with:
./xmlxslt.sh /home/niho/words.xml /home/niho/words.xsl ISO-8859-1 >
/home/niho/words.html

/Niklas

-----Original Message-----
From: andrew welch [mailto:andrew.j.welch@xxxxxxxxx]
Sent: den 9 juni 2006 13:01
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] EDVedv commes out as ??

On 6/9/06, Niklas Holmberg <Niklas.Holmberg@xxxxxxxxx> wrote:
>
> Hey, that actually worked =)
> But i guess now that the encoding that i specify in the xsl will be
overruled and all transformations will be to UTF-8? What can be done about
that? Add an extra argument?

Good :)

Adding that switch just sets your platform default encoding - that is, any
operation that involves an encoding where one hasn't been specified will use
the platform default encoding, which in your case was probably ISO-8859-1.
That encoding didn't contain a mapping for the character you are trying to
output, so ? is used instead.  Now that the platform default encoding is set
to UTF-8, that does contain a mapping for your characters and so the correct
bytes are written to disk.

The goal with encoding is to ensure all encodings match - the encoding that is
used to read the XML file must match the encoding in the XML prolog, and
equally the encoding that is used when the result is written to disk must
match the output encoding specified in the stylesheet.  Common sense really.

cheers
andrew





Confidentiality Notice: This e-mail transmission may contain confidential or
legally privileged information that is intended only for the individual or
entity named in the e-mail address. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or reliance
upon the contents of this e-mail is strictly prohibited and may be unlawful.
If you have received this e-mail in error, please notify the sender
immediately by return e-mail and delete all copies of this message.

Current Thread