Re: ISO-8859-1 to ASCII conversion?

Giganews Newsgroups
Subject: Re: ISO-8859-1 to ASCII conversion?
Posted by:  Remy Lebeau (Indy Team) (
Date: Thu, 22 Mar 2007

"Christian Gorski" <> wrote in message

> Is there a function which converts ISO-8859-1 to ASCII (&#65533; ->

ISO-8859-1 is already in ASCII format.  There is nothing to convert.
What you are asking for has nothing to do with converting ISO-8859-1
itself.  You are asking for an entity decoder instead.  That is a very
different issue.

Simply parse out the substring between the '&' and ';' characters.  If
the substring begins with '#' then strip it off and pass the rest to
StrToInt().  You can then look up the resulting Integer in the
Character set for the document to retreive the original character.  If
the substring does not begin with '#', then you will have to look up
the value in the list of known entity names, as defined by the various
HTML and XML standards.




In response to

ISO-8859-1 to ASCII conversion? posted by Christian Gorski on Thu, 22 Mar 2007