[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: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 7 Jan 2005 17:53:45 GMT

If your file is EBCDIC then you shouldn't declare the encoding as
latin 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')"/>


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:

Current Thread