You might get a chuckle reading this DeMoronizer, but then again, I'd like to know what others are doing when their users grab text from MS Word.
In Notepad or a RTF editor like FCKeditor, doublequotes "look like this" and translate to ASCII character #34.
In MS Word, doublequotes “look like this” (MS "smart quotes") and translate to some extended character, and may or may not even show up on the users' web page, depending on the browser, and possibly the current lunar phase.
I am trying to scrub data entered into the FCKeditor before it goes into a database, and I know some users will paste from MS Word. What do you do in this case?
Again they should "look like this" and are easily trapped (and " is inserted in their place by the FCKeditor.)
but coming from MS Word they “look like this” and are not so easily trapped. That's just one case. There are other screwy things MS Word does, like using <i> for italic, <b> for bold...
Do you just tell users they cannot use MS Word?
Thanks!
Dennis
Wed, 01/28/2009 - 22:06
#1
Re: Microsoft Word doublequote and other nasty stuff
Dennis
Re: Microsoft Word doublequote and other nasty stuff
FCKConfig.ProcessNumericEntities = true ;
FCKConfig.AdditionalNumericEntities = '[\?‘’“”–]' ; // Single Quote: "'"
FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
*******Make sure you are using a UTF safe editor *********** I recommend ultraedit.
Re: Microsoft Word doublequote and other nasty stuff
Thanks, Nyxll
I'm looking into Notepad ++, I'll check out UltraEdit as well.
Dennis