W Luke wrote:

> I have a page which enters details via an array into a DB. At the
> moment, some of the items in the array contain ASCII characters which 
> I need to convert to their proper "symbols." For example:
>
> James' fear of spiders
>
> I presume this should read "James' fear of spiders."  I'd like to
> convert the string before entering into the DB, but would also like to
> fix the current table (contains about 20,000 of which about half have
> these ASCII characters).

If string is the string you want fixed:
#Evaluate("'"&REReplaceNoCase(string,"&##([0-9]+);","'&##Chr(\1)##&'","All")&"'")#

But I am sure Ray will now join and tell us that Evaluate() is evil :)

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to