I am trying to clean up some text that is entered into a form. The
text usually comes from Word but also comes from other sources. I
usually get a box instead of the char in this situation. I'm using
an include that I pulled off of cflib and I'm trying to adjust it.
The code is basically:
function ConvertSpecialChars(textin) {
return ReplaceList(textin, "#chr(28)#,#chr(145)#,#chr(146)#,#chr(147)
#,#chr(148)#", "',',',#chr(34)#,#chr(34)#");
}
I added the chr(28) which seems to be the left side of a smart quote
from Word but this doesn't seem to be cleaning that out and replacing
it with a single quote (though now I realize it should be a double-
quote). Here's a test that I did that shows the bad char and it's
number using asc(the_letter). Even though it goes through this
cleaning, it still shows a the chr(28) char. In addition, though it
doesn't show the bad right quote, when I go into the form to edit it,
the invisible right quote is there and I can tell by moving the
insertion point over letter by letter where it pauses at that spot.
Anyhoo, why doesn't it replace this char and is there a better way of
doing this?
thanks and good morning (or whichever time you're at).
_____________________________
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241778
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54