I'm having trouble developing a PHP function which allows users to copy paste content into a text area and have it inserted into a database and spit out on another page. Semantically I'm fine however there are some characters where users have copy pasted that somehow are not encoded into their respective html entities and when I spit them back out, I get the ¿ character instead of what was supposed to be there.
Mainly it seems that the ----> ’ <------ is the problem, as well as the -----> “ <-------- . These seem to just be right and left single and double quotes however I have no found a single PHP function that will convert these into the correct html entity!
Any help would be greatly appreciated.