Page 1 of 1

Copy-and-Pasting problem from MS Word

Posted: Thu Nov 11, 2004 9:33 am
by EricS
I have a couple of clients who use my applications and they insist on typing out data that goes in my forms in Word first, mostly for the spelling and grammar check I'm betting, and then copy-and-pasting the data from MS Word into my forms.

Most of the time, everything works fine. Occasionally they will copy a character from Word that uses a character encoding that PHP doesn't like. In these instances, the character is stored as a decimal entity, such as ‟ Now before I output anything to the screen, ESPECIALLY user input, I htmlentities() the data first. This causes the leading & to be changed to & with causes an ugly string to show on the screen.

Anyone else having this problem and if so, how are you getting around it?

Thanks,
EricS