Using tohtml to translate &amp

Mike Schwartz mschw at athenet.net
Fri Jun 24 09:29:28 PDT 2011


> Mike Schwartz wrote:
> 
> >10/27/2007 2:37 PM Walter posted:
> >
> >
> >
> >>>Need to replace the & in H & R block with &
> >>>
> >>>Name="H & R Block"
> >>>
> >>>
> >>B=TOHTML(A)
> >>
> >>
> >
> >     Running filepro 5.0.14 on Linux.
> >
> >     I have to read some incoming XML files that are encoded with &amp,
> >&gt, etcetera.  filePro 5.0.14 doesn't have a "FROMHTML()" function
> available.
> >
> >
> >Before I sit down to write a whole bunch of INSR's and MID's, does
> >anybody have a an unencoding routine already written that they would care
> to share?
> >
> >
> Dang. Looking at this list, you really want to use a separately maintained
> parser.
> http://www.degraeve.com/reference/specialcharacters.php
> 
> Mark (fairlite) might still need a couple of benjamins, and might be able
to
> knock a perl thing out in a hour or so.

Thanks Walter:

     I looked at the long list of "&" codes on other web sites including
www.unicode.org.  However, after parsing a couple of hundred incoming XML
files, there are only 4 "&" codes that appear to be used.  I'm not likely to
encounter a "Cryllic Small Letter Yeru".     <grin>

      Missing a code here and there wouldn't be the end of the world because
the data is put into name and address fields that are just for visual
reference.  e.g., The users won't be sending any mailings out using the
data.

    I guess I'll start writing the INSTRs and MIDs.  The slightly messy task
that needs to be done is closing up the gaps in the strings when I replace 3
or 4 characters "&amp" with just one "&".   

Thanks!

Mike
 

     


  



More information about the Filepro-list mailing list