charset issue with mysql

前端 未结 3 612
离开以前
离开以前 2021-01-27 01:01

I\'m trying to store the following line in mysql:

$data = \"After 30μs, what fraction of the charge will remain?\"

If I display $data on HTML P

3条回答
  •  失恋的感觉
    2021-01-27 01:42

    Whats your MySQL server's default charset and collation? Try executing the following query before any other queries inside your scripts.

    SET NAMES utf8 COLLATE utf8_general_ci;
    

    BTW, are we talking about a MySQL server?

提交回复
热议问题