> Seems like after I copy and paste content form MS Word, there's always
time
> spent turning the MS Word single and double quotes into real ones
(that
> don't produce garbage on the screen.  Is there some kind of RegEx I
can use
> to find and replace such content in a CF Script.  Can CF know what an
MS
> Word quote is?

I currently use this (as part of a larger "markup sweep" tag) to replace
the
common MS Word non-conforming characters:

markupString = ReplaceList(markupString,
"&##8216;,&##8217;,&##8220;,&##8221;,&##8230;,&##8211;,&##8212;
,&##8226;,&##8482;", "',',",",..., - , - ,-,™");

(That's: Left single quote,  Right single quote,  Left double quote,
Right
double quote,  Ellipsis,  En-dash,  Em-dash,  Bullet, and Trademark).

This is used in conjunction with ezEdit where, if you paste from
Word, the source that gets submitted seems to contain these decimal-code
character entities for the non-conforming characters (e.g. ‘ for
left single quote). Not sure if this would be the case with other text
entry controls... Should be easy to adapt using Chr() with the
equivalent
ASCII codes.

In short, I don't think there's a nice Regex - dig out a good reference
table for character codes and do a straight series of Replaces.

HTH,

- Gyrus

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to