Hi Daniel,

Here's a UDF off of cflib.org that specifically cleans weird chars from
WORD: http://cflib.org/udf.cfm?ID=319

It removes these chars: chr(145), chr(146), chr(147), chr(148)

If you expand this to clean a lot more maybe you should post it - I've seen
others ask about such functionality.

Cheers,
Baz


-----Original Message-----
From: Daniel Kessler [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 03, 2006 2:01 PM
To: CF-Talk
Subject: cleaning text that doesn't display well

I have a form where people enter information into a database and it's  
displayed on a web page.  We all do, I'm sure.  Often times people  
paste the text in from whatever source they receive it from, often MS  
Word docs, but really anything.  Because of this, I often receive  
characters that don't display well and are either a box or a box with  
an X in it.  I'd like to clean this text on the way in.

I'd like some advice on how to go about this.  Should not allow any  
ascii values above 127 or try and gather a list of bad characters and  
change them into known good characters (curly quotes into straight  
quotes for example)?  I'm sure this isn't a new question, so how do  
you go about it?  I didn't see anything in the archives but I am not  
a good searcher.  Is there maybe a CFC that already does this (and is  
free!)?

thanks for any assistance.

_____________________________

Daniel Kessler

College of Health and Human Performance
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
Phone: 301-405-2545
http://hhp.umd.edu






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228286
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to