character encoding issue with mysql
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.
精彩评论