开发者

character encoding issue with mysql

开发者 https://www.devze.com 2022-12-16 13:01 出处:网络
In my LAMP app, users sometimes cut and paste input into my web forms from other applications like MS word.

In my LAMP app, users sometimes cut and paste input into my web forms from other applications like MS word.

All of my webpages are set, via content type tag, to display in UTF. My PHP script saves the data for the we开发者_运维知识库b form into a mysql table that has the character encoding set to UTF-8.

There is an apostrophe character that will display correctly in the html, but in the mysql tables, viewed from a Linux command prompt, it displays as ’.

If both the html page and mysql table are using the same encoding, why is the rendering of that character different?


Perhaps the reason is that your Linux command prompt uses a font that does not support that character.

Windows' cmd by default will use a font that doesn't support that either. Relax though, your data is stored like the way you wanted it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号