You need to check the character encoding. Basically, you have a string encoded in one format, and you duplicate it in another format.
For international things (and it looks like you are doing this), I would use UTF-8: - In your HTML file add to the head (at the top) - In your PHP, make sure that you treat all the lines as UTF-8 - If you have there is also a database, make sure that the database, tables and fields are configured as UTF-8 (warning: this change may damage the data extraction without import / export!). - If you are reading template files with special characters, make sure it is UTF-8. (If there are no special characters, then normal AscII will do)
This is a simple answer. There you can read about character encoding - just google.
(An alternative solution, use ASCII, but convert everything to web-based character codes. But it's harder to get all the codes in order, especially when processing user input.)
source share