retrieving special characters from mysql database,

2019-05-22 23:13发布

I've inserted some data to a mysql database. Set up the utf-8 cz. And it looks fine. enter image description here

But when I echo a row from the table, special characters are not shown. Meta utf-8 included. enter image description here

Any ideas how to fix it? Thank you

2条回答
甜甜的少女心
2楼-- · 2019-05-22 23:47

add this too your too to ensure browser's read your page with the right encoding:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
查看更多
女痞
3楼-- · 2019-05-23 00:01

use

mysql_set_charset('utf8');

before you execute the query in PHP

查看更多
登录 后发表回答