I have a form in my page for users to leave a comment.
I’m currently using this charset:
meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"
but retrieveving the comment from DB accents are not displaying correct ( Ex. è =>è ).
Which parameters should i care about for a correct handling of accents?
SOLVED
-
changed meta tag to charset=’utf-8′
-
changed character-set Mysql (ALTER TABLE comments CONVERT TO CHARACTER SET utf-8)
-
changed connection character-set both when inserting records and retrieving ($conn->query(‘SET NAMES utf8’))
Now accents are displaying correct
thanks
Luca
The ISO-8859-1 character set is for Latin characters only. Try UTF-8, and make sure that the database these characters are coming from are also UTF-8 columns.