Michael
If the offer is open I wouldn't mind getting the tag from you, sound very
useful.
Rodney
-----Original Message-----
From: Caulfield, Michael [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 10:29 AM
To: CF-Talk
Subject: RE: Stripping certain ASCII characters for XML file
What you really want to do (if you're going to XML) is replace those
characters with numeric entities (XML will bomb on HTML entities unless you
explicitly declare them in your DTD, or use an HTML compliant DTD)
Hence your your & is &, your non-breaking space is   (i think)
and not etc.
The easiest way to do this is replace(chr(x),"&##" & x & ";", mystring,
"ALL") You can do this in a loop where x=127 to 254 (but make sure to hit
your "&" at 38, etc.)
getting your &s; and to numeric entities is a little more involved
-- you basically run through an array of replaces where arr[n] is the HTML
entity for chr(n). Somewhere I have a custom tag called
cf_makeEntitiesNumeric that does this, and I can dig it up if you need it.
Michael Caulfield
-----Original Message-----
From: Paul Sizemore [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 11:53 AM
To: CF-Talk
Subject: Stripping certain ASCII characters for XML file
How would I make sure that any output I save to a file (CFFile) is
restricted to characters 32-126 of the 127 US_ASCII approved characters? I'm
currently using Repace("xxx","yyy","zzz","all") to replace / escape some
characters (like "&" to "&") for an XML file.
Paul Sizemore
Finish Line
3308 N Mitthoeffer Rd
Indianapolis, IN 46235
W: 317-899-1022 ext 3516
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists