I've been struggling with this for a while. I'm building a web site in PHP and MySQL. But the way that special characters such as "öäüß" behave is oddly random!
I'm using these encodings:
- PHP Files: Unicode (UTF-8 with signature) Codepage 65001 (Saved in VS2012, PHP-Tools for VS Plugin)
- Database fields: latin1_swedish_ci (I also tried several others)
- HTML:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Bugs
- When I enter special characters in phpMyAdmin, they look bad on the web site
- When I insert them with
INSERT
from a$_POST
variable, they look good on the web site but bad in phpMyAdmin - When I deploy the result on a remote server, special characters look bad in both phpMyAdmin and on the web site.
Question
I have the feeling that I'm doing something terribly wrong here and that changing some encoding here and there will not eventually solve this issue.
Any suggestions where to set what encoding?