Strange character in fresh WAMP installation?

放肆的年华 提交于 2019-12-02 11:53:38

I'll answer here because it's too long for a comment.

You don't need to change your encoding, you should check your encoding. Keep in mind that encoding could be changed in a lot of different places:

Any of these reasons could lead to wrong encoding displayed in the web browser. And if you do not specify it with one or more the previous methods, the corresponding layer will use its configured default.

In your case since the text is coming from database and since often in WAMP/XAAMP/MAMP MySQL use a weird default encoding, I'd check for point one. Try to execute SET NAMES UTF-8 (or whatever encoding you use) query before retrieving data, just after your db connect function.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!