xsl-list
[Top] [All Lists]

Re: UTF-8 to ASCII encoding problem

2005-05-19 08:17:22
  I receive documents in UTF-8 which may contain pound signs correctly
  encoded as &163;. I need to style these into ASCII and so my style sheet
  defines the output encoding -   <xsl:output method="xml" indent="yes"
  encoding="ISO-8859-1"/>. 

That's latin1 not ascii
(ASCII is for people who think that "pound" means "#" and does not
include a pound (sterling) symbol.)

  the sequence EF BF BD 

Sounds like a bug but you may be able to use
 encoding="US-ASCII"/>
so that the output really is ASCII, then pound signs will be output as
as a character reference such as &#A3; which may work better.

So long as your input file isn't being corrupted when moving between
systems.

For example your mail has the line

on two platforms ? one Windows,

which looks like

on two platforms \226 one Windows,

on my email reader which displays unprintable characters in octal.
octal 226 is byte 150 which is a non printing control character in
iso-8859-1 (I believe it may be something else in a windows code page)

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



<Prev in Thread] Current Thread [Next in Thread>