Dear Community,
I have a concern which I think I never had before - when I add data to my MySQL Database from PHP, the umlauts (ä,ö,ü) get encrypted.
This happens only when I do it via PHP.
I see the encrypted form when I log on to phpMyAdmin and when I visit the website.
When I edit the content via phpMyAdmin I can use the normal umlauts and they are both shown good (on the website and phpMyAdmin).
I tried several things to solve the problem, from adding to my mysql-class a query with SET NAMES 'UTF8' to using decode_utf8() function while retrieving data in mysql class.
I set charset in html and removed it - nothing changes.
My guess is that PHP is changing the umlauts in some way and sending the "wrong" data to MySQL Server.. is that right?
I don't want to store the data in a wrong format, and since I can store the data from within phpMyAdmin, it should be possible to send the data in the same charset via PHP right?
How can I solve this?
Best regards,
Matthias
I have a concern which I think I never had before - when I add data to my MySQL Database from PHP, the umlauts (ä,ö,ü) get encrypted.
This happens only when I do it via PHP.
I see the encrypted form when I log on to phpMyAdmin and when I visit the website.
When I edit the content via phpMyAdmin I can use the normal umlauts and they are both shown good (on the website and phpMyAdmin).
I tried several things to solve the problem, from adding to my mysql-class a query with SET NAMES 'UTF8' to using decode_utf8() function while retrieving data in mysql class.
I set charset in html and removed it - nothing changes.
My guess is that PHP is changing the umlauts in some way and sending the "wrong" data to MySQL Server.. is that right?
I don't want to store the data in a wrong format, and since I can store the data from within phpMyAdmin, it should be possible to send the data in the same charset via PHP right?
How can I solve this?
Best regards,
Matthias
Comment