xsl-list
[Top] [All Lists]

Re: Unparsed-text and character conversion

2005-01-07 10:53:45

If your file is EBCDIC then you shouldn't declare the encoding as
latin 1:
'iso-8859-1'

You could declare it as EBCDIC but then there's no guarantee that the
system will understand that. (Althouggh it's not guaranteed to
understand iso-8859-1 either).

probably Michael will tell you adding a new supported encoding only
means writing half a line of java and compiling some new class
somewhere, but personally I'd probably cheat and read it as latin 1 as
you have and then use translate() or replace() to fix up the EBCDIC
to iso-8859-1 conversion:


   <xsl:variable name="input-text" as="xs:string"
select="translate(unparsed-text($input, 'iso-8859-1'), 'ebcdic codes',
'ascii codes')"/>

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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