xsl-list
[Top] [All Lists]

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

2006-06-09 04:10:05

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(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com]
Sent: den 9 juni 2006 13:01
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] ÅÄÖåäö commes out as ??

On 6/9/06, Niklas Holmberg <Niklas(_dot_)Holmberg(_at_)eniro(_dot_)com> 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

--~------------------------------------------------------------------
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>
--~--





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.

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>