Accented characters in mySQL table

后端 未结 6 644
别跟我提以往
别跟我提以往 2020-12-02 23:53

I have some texts in French (containing accented characters such as \"é\"), stored in a MySQL table whose collation is utf8_unicode_ci (both the table and the columns), that

6条回答
  •  醉梦人生
    2020-12-03 00:20

    This works for me

    1. Make your database utf8_general_ci
    2. Save your files in N++ as UTF-8 without BOM
    3. Put $mysqli->query('SET NAMES utf8'); after the connection to the database in your PHP file
    4. Put < meta charset="utf-8" /> in your HTML-s

    Works perfect.

提交回复
热议问题