xsl-list
[Top] [All Lists]

RE: Unparsed-text and character conversion

2005-01-07 11:30:45
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(_at_)blockvision(_dot_)com] 
Sent: 07 January 2005 17:41
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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


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




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