Whenever I am adding accented characters to my mysql table, my special characters are getting displayed like that in the database.
Everything is in utf8. Any idea please ?
PS:
- My MySQL connection page starts with header(“Content-Type: text/html; charset=UTF-8”);
- Just below my mysql_connect, I have mysql_set_charset(‘utf8’, $conn);
- At the top of every page (top.php), I have ini_set(‘default_charset’, ‘utf-8’)
- My MySQL table has the collation utf8_unicode_ci
- My page properties in DW are: UTF-8, Unicode normalisation form: C, BOM is checked.
Thus, if I send bébé ç
through a php form, I get bébé ç
in the database and the same gets echoed if I print the value as text. However, if I echo the value as form-field-value I get bébé ç
as initially sent.
On the other hand, if I edit the table directly (via phpmyadmin) and write bébé ç
in place of bébé ç
, I get bébé ç
echoed when I print that as text, and the form-field-value reads b�b� �
.
So, this is another question, when what we print in form value is different from what we print as text value
Thanks for any help