[thelist] Character Entity problem: Word -> Web -> PHP -> MySQL

Ed McCarroll Ed at ComSimplicity.com
Sun Feb 16 16:24:01 CST 2003


We have a web site, which I did not create, and its users enter
text into several form fields.  In many cases, users create their
text in MS Word, and then paste it into the form.

When the form is submitted, PHP stores the text in a MySQL
database.  The problem is that there are some special characters,
like smart quotes, that get translated into character entities
like "“".

Short of writing a TranslateBackToWhatImeant function that searches
the text for every conceivable entity, does anyone know of a way to
either stop this from happening, or fix it?

(I followed the recent "Rich Text editor" thread with interest, but
I want my output to be plain text, not HTML.)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ed McCarroll                          MailTo:Ed at ComSimplicity.com
ComSimplicity                                      (310) 838-4330
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -





More information about the thelist mailing list