Basically, I decided to run htmlentities() with the 'UTF-8' parameter since that's the encoding I use for my html.
However, I recently noticed that it would not return anything if the string included a pound symbol. I don't know if this is a php bug or what...but check this out:
Code: Select all
echo htmlentities('£'); //outputs "£"
echo htmlentities('£', ENT_QUOTES, 'UTF-8'); //outputs nothing
echo htmlentities('something without a pound symbol <>', ENT_QUOTES, 'UTF-8'); //outputs "something without a pound symbol <>"Thanks for any clarification,
Jack.