Altova Mailing List Archives


RE: [xsl] Unparsed-text and character conversion

From: "Michael Kay" <mike@------------>
To:
Date: 1/7/2005 6:31:00 PM
If your file does turn out to be EBCDIC, there's a list of character codes
supported by Java at 

http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html

It might be that Cp500 is the particular variant of EBCDIC required (there
are as many EBCDIC derivatives as there are ASCII derivatives, so it's hard
to be sure!)

Michael Kay
 

> -----Original Message-----
> From: Jim Neff [mailto:jneff@xxxxxxxxxxxxxxx] 
> Sent: 07 January 2005 17:41
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Unparsed-text and character conversion 
> 
> Greetings,
> 
> I am having a problem with the unparsed-text function.
> 
> Here is my code:
> 
>    <xsl:variable name="input-text" as="xs:string"
> select="unparsed-text($input, 'iso-8859-1')"/>
> 
> My input file has a value in it of "000060-"
> 
> My stylesheet is converting this to "6.60"
> 
> The real decimal value is supposed to be a "-6.00".  
> 
> My hypothesis is the hyphen is the EBCDIC character which has the hex
> equivalent of "60".  Oh, and did I mention this file is from 
> an AS/400 ?
> 
> My question is how can I read this value without the 
> character converting it
> to the 60?
> 
> There is a bonus prize is someone can not only tell me how to 
> read it as
> 6.00, but also determine the negative value within a stylesheet.
> 
> Thank you much, in advance,
> 
> Jim neff

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.