I am using htmlspecialchars() because this webiste support many different languages. The CMS allows users from around the world to publish their own content in their own language and depending on where a visitor IP address is based, that language is delivered to the browser from the MYSQL database. The languages cover German, Korean, Chinese and Spanish.
As far as I have understood, I need ot use htmlspecialchars() to convert umulats and other special characters used in languages other the british.
Does this make sense? Does it help?
Bonesnap - your comment about storing strings as 'raw' and then sanitize them on page output - am I right in understanding the way I am doing it is correct for special characters ni foreign languages? I.e. I have to convert them before saving them into my database?
My database is UTF-8 and so to are my web pages.