[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Unparsed-text and character conversion

Subject: RE: [xsl] Unparsed-text and character conversion
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 7 Jan 2005 18:16:21 -0000

I think you need to look at the file in a hex editor and see what the actual
bits are. This doesn't look very plausible to me as an EBCDIC-to-ASCII
conversion problem, but seeing the hex values will quickly confirm it one
way or the other.

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

Current Thread