House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Handling MS Word "Smart" Quotes

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

Handling MS Word "Smart" Quotes.

Somthing you might find of interest.... Stephen Moretti 04/30/2003 09:48 AM
Strange, I copied the text from your email and it worked... I guess it Ryan Mitchell 04/29/2003 03:06 PM
Well, the code for the UDF is pretty straight forward: Mosh Teitelbaum 04/29/2003 02:54 PM
replace them with their decimal equivalents before inserting them into the Snyder, Scott, A&M IRM 04/29/2003 02:53 PM
Those characters are ASCII 145-148 (two quotes, two double quotes).  Barney Boisvert 04/29/2003 02:52 PM
I was looking for something similar myself, but I couldn¹t get this script Ryan Mitchell 04/29/2003 02:44 PM
In the app I have, people can copy/paste directly into textarea. I have a E. Keith Dodd 04/29/2003 11:47 AM
Check out the ConvertSpecialChars() UDF at: Mosh Teitelbaum 04/29/2003 11:16 AM
I believe there is a UDF on cflib.org that handles and strips Word's Andre Mohamed 04/29/2003 11:10 AM
Hi Ian, Dain Anderson 04/29/2003 11:09 AM
> The trouble I'm having is with MS Word's smart quotes, those fancy single Massimo Foti 04/29/2003 11:08 AM
I've got an simple content management application where users cut and paste Ian Skinner 04/29/2003 11:02 AM

04/30/2003 09:48 AM
Author: Stephen Moretti Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118204 Somthing you might find of interest.... http://www.tazmedia.co.uk/software/tags/try_CleanMSText.cfm Stephen ----- Excess quoted text cut - see Original Post for more -----
04/29/2003 03:06 PM
Author: Ryan Mitchell Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118088 Strange, I copied the text from your email and it worked... I guess it displayed wrong in my browser... Thanks Mosh. Ryan On 29/4/03 7:48 pm, "Mosh Teitelbaum" <mosh.teitelbaum@evoch.com> wrote: > ReplaceList(textin, "#chr(145)#,#chr(146)#,#chr(147)#,#chr(148)#", > "',',"",""")
04/29/2003 02:54 PM
Author: Mosh Teitelbaum Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118087 Well, the code for the UDF is pretty straight forward:   ReplaceList(textin, "#chr(145)#,#chr(146)#,#chr(147)#,#chr(148)#", "',',"",""") What sort of problems is it causing you in CFMX? -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: mosh.teitelbaum@evoch.com WWW: http://www.evoch.com/ ----- Excess quoted text cut - see Original Post for more -----
04/29/2003 02:53 PM
Author: Snyder, Scott, A&M IRM Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118086 replace them with their decimal equivalents before inserting them into the DB.  I think they are       “ and ” I was looking for something similar myself, but I couldn¹t get this script to work in MX, any thoughts? On 29/4/03 4:10 pm, "Mosh Teitelbaum" <mosh.teitelbaum@evoch.com> wrote: > Check out the ConvertSpecialChars() UDF at: > http://www.cflib.org/udf.cfm?ID=319 > > You can use it to replace the MS Word characters or convert its logic to SQL ----- Excess quoted text cut - see Original Post for more -----
04/29/2003 02:52 PM
Author: Barney Boisvert Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118085 Those characters are ASCII 145-148 (two quotes, two double quotes).  You can easily do a search and replace on them to replace them with the proper codes.  Of course, you'll have to make sure your pulling data out of the DB in the right character set for this to work, and that's the tricky part. Best to do it on the insertion side, before inserting it into the database. barneyb --- Barney Boisvert, Senior Development Engineer AudienceCentral (formerly PIER System, Inc.) bboisvert@audiencecentral.com voice : 360.756.8080 x12 fax   : 360.647.5351 www.audiencecentral.com ----- Excess quoted text cut - see Original Post for more -----
04/29/2003 02:44 PM
Author: Ryan Mitchell Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118080 I was looking for something similar myself, but I couldn¹t get this script to work in MX, any thoughts? On 29/4/03 4:10 pm, "Mosh Teitelbaum" <mosh.teitelbaum@evoch.com> wrote: ----- Excess quoted text cut - see Original Post for more -----
04/29/2003 11:47 AM
Author: E. Keith Dodd Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118050 In the app I have, people can copy/paste directly into textarea. I have a tag for the various chr's, but found I had to include replacing the actual characters before inserting into database table field. This took care of all the smart quotes. The MSRubbish is the original entry. (Adapted from Chris Tazewell's CleanMSText custom tag) (Don't know whether the actual curly stuff will show in this posted email.) MSRubbish = Replace(MSRubbish, '"', '"', 'all');   MSRubbish = Replace(MSRubbish, '"', '"', 'all');   MSRubbish = Replace(MSRubbish, "'", "'", 'all');   MSRubbish = Replace(MSRubbish, "'", "'", 'all'); E. Keith Dodd Wings of Eagles Services www.wingserv.com > I've got an simple content management application where users cut and paste > text from MS word into form fields that are then inserted into a MS SQL 2000 > database.  Subsequently this text is pulled out of the database and > displayed in HTML pages to other users.  Pretty standard stuff. > > The trouble I'm having is with MS Word's smart quotes, those fancy single > and double quote marks that are curved.  When these are cut and pasted into > the form and then pulled out to display, the HTML does not recognize the > characters and display's small boxes.  Is there a simple way to scrub my > database of these smart-aleck marks and replace them with their > straight-laced cousins and/or format my HTML so that it understands the > smarty pants curvy ones? > > I'm hoping for a simple automated solution that I can apply globally so that > the poor content admin doesn't have to go back to the 100's of documents to ----- Excess quoted text cut - see Original Post for more -----
04/29/2003 11:16 AM
Author: Mosh Teitelbaum Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118046 Check out the ConvertSpecialChars() UDF at:   http://www.cflib.org/udf.cfm?ID=319 You can use it to replace the MS Word characters or convert its logic to SQL and apply it with an UPDATE statement. -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: mosh.teitelbaum@evoch.com WWW: http://www.evoch.com/ ----- Excess quoted text cut - see Original Post for more -----
04/29/2003 11:10 AM
Author: Andre Mohamed Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118043 I believe there is a UDF on cflib.org that handles and strips Word's smart quotes under string functions? Check it out. André I've got an simple content management application where users cut and paste text from MS word into form fields that are then inserted into a MS SQL 2000 database.  Subsequently this text is pulled out of the database and displayed in HTML pages to other users.  Pretty standard stuff. The trouble I'm having is with MS Word's smart quotes, those fancy single and double quote marks that are curved.  When these are cut and pasted into the form and then pulled out to display, the HTML does not recognize the characters and display's small boxes.  Is there a simple way to scrub my database of these smart-aleck marks and replace them with their straight-laced cousins and/or format my HTML so that it understands the smarty pants curvy ones?   I'm hoping for a simple automated solution that I can apply globally so that the poor content admin doesn't have to go back to the 100's of documents to find and change each curvy single and double quote mark by hand. -------------- Ian Skinner Web Programmer BloodSource Sacramento, CA
04/29/2003 11:09 AM
Author: Dain Anderson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118042 Hi Ian, Here's an adaptation I made to a script I found on CFLib.org used for converting those little buggers (it also handles the ellipsis character, the TM character MS uses, as well as the extended hyphen): In UDF format: function ConvertSpecialChars(textin) {    return ReplaceList(textin,"#Chr(8217)#,#Chr(8230)#,#Chr(8211)#,#Chr(8220)#,#Chr(822 1)#,#Chr(8482)#", "',...,--,"","",<SUP>TM</SUP>"); } -Dain > I've got an simple content management application where users cut and paste > text from MS word into form fields that are then inserted into a MS SQL 2000 > database.  Subsequently this text is pulled out of the database and > displayed in HTML pages to other users.  Pretty standard stuff. > > The trouble I'm having is with MS Word's smart quotes, those fancy single > and double quote marks that are curved.  When these are cut and pasted into > the form and then pulled out to display, the HTML does not recognize the > characters and display's small boxes.  Is there a simple way to scrub my > database of these smart-aleck marks and replace them with their > straight-laced cousins and/or format my HTML so that it understands the > smarty pants curvy ones? > > I'm hoping for a simple automated solution that I can apply globally so that > the poor content admin doesn't have to go back to the 100's of documents to ----- Excess quoted text cut - see Original Post for more -----
04/29/2003 11:08 AM
Author: Massimo Foti Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118041 > The trouble I'm having is with MS Word's smart quotes, those fancy single > and double quote marks that are curved.  When these are cut and pasted into > the form and then pulled out to display, the HTML does not recognize the > characters and display's small boxes.  Is there a simple way to scrub my > database of these smart-aleck marks and replace them with their > straight-laced cousins and/or format my HTML so that it understands the > smarty pants curvy ones? Try this: http://www.cflib.org/udf.cfm?ID=725 ---------------------------- Massimo Foti Certified Dreamweaver MX Developer Certified Advanced ColdFusion MX Developer http://www.massimocorner.com/ ----------------------------
04/29/2003 11:02 AM
Author: Ian Skinner Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:23492#118040 I've got an simple content management application where users cut and paste text from MS word into form fields that are then inserted into a MS SQL 2000 database.  Subsequently this text is pulled out of the database and displayed in HTML pages to other users.  Pretty standard stuff. The trouble I'm having is with MS Word's smart quotes, those fancy single and double quote marks that are curved.  When these are cut and pasted into the form and then pulled out to display, the HTML does not recognize the characters and display's small boxes.  Is there a simple way to scrub my database of these smart-aleck marks and replace them with their straight-laced cousins and/or format my HTML so that it understands the smarty pants curvy ones?   I'm hoping for a simple automated solution that I can apply globally so that the poor content admin doesn't have to go back to the 100's of documents to find and change each curvy single and double quote mark by hand. -------------- Ian Skinner Web Programmer BloodSource Sacramento, CA
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference