Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Proper encoding

From: Roshawn Dawson <udrago@---------.--->
To: NULL
Date: 8/1/2005 8:39:00 AM
Thanks for the input, Bjoern!  :-)

Bjoern Hoehrmann wrote:
> * Roshawn Dawson wrote in microsoft.public.xsl:
> 
>>I'm creatin an affiliate site for Amazon.com, and I am having an 
>>encoding issue in xsl.  Given a name that contains the &eacute; symbol 
>>(latin small letter e with acute), how do I properly encode it?
>>
>>For instance, Amazon.com encodes the symbol as %E9 while in xsl it is 
>>encoded as %C3%A9.  How can I have it done Amazon's way,
> 
> 
> Please make sure %E9 is what you really need; this encoding is based on
> ISO-8859-1 which can't encode many characters (like the euro symbol or
> japanese "characters"), %C3%A9 would be the proper way here, this is
> based on UTF-8 which does not have the problems cited above. That said,
> all you need is encode the string to a byte array using the ISO-8859-1
> encoding first, and then replace octets > 0x7F by their %xx equivalent.
> If you use the .NET Framework, the System.Web.Uri class has methods for
> this purpose. For XSLT you'd need to have this code in an extension
> function (or a complicated template), I don't think there is any other
> means available since the XSLT standard requires the results you get.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent