snipped from the html property type in SpeckCMS...

// convert windows 1252 chars to nearest latin1 or html entity
lFind = "#chr(128)#,#chr(130)#,#chr(131)#,#chr(132)#,#chr(133)#,#chr(134)#,#chr(135)#,#chr(136)#,#chr(137)#,#chr(138)#,#chr(139)#,#chr(140)#,#chr(142)#,#chr(145)#,#chr(146)#,#chr(147)#,#chr(148)#,#chr(149)#,#chr(150)#,#chr(151)#,#chr(152)#,#chr(153)#,#chr(154)#,#chr(155)#,#chr(156)#,#chr(158)#,#chr(159)#";


lReplace = "€,‚,ƒ,„,…,†,‡,ˆ,‰,Š,‹,Œ,&##381;,‘,’,“,”,•,–,—,#chr(126)#,™,š,›,œ,&##382;,Ÿ";

inHTML = replaceList(inHTML, lFind, lReplace);


The code above is part of a function I use when reading html content from a form field before inserting into the database. You can download the entire function from www.speckcms.com if you like, it's called escapeHTML() and it's in the html.cfm file within the Speck API and sample CMS zip archive.



Regards


Mark


Hi all,

I've got a problem with Word characters in html - the apostrophe and
quote characters.
1. I save the Word doc as "html (filtered)".
2. Then upload the html file through a web form.
3. When I try to output the html on screen, the two characters are
replaced by the "square" character.

I've tried doing a Replace() on the text before outputting it. Replacing
all instances of the apostrophe and quote characters with the html
equivalent.
I've tried referencing the funny characters using Chr(8216) and
Chr(8220) but it doesn't work and I always end up with a "square"
character - or Chr(63).

Can anyway give a suggestion on how to get rid of these funny Word
characters?

Many thanks, Douglas


-- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



Reply via email to