Website for pfcmanager.cf
My website is not getting/setting special characters correctly from database.
When retrieving special characters from the database it shows some sort of “?” character instead.
When inserting special characters into the database it saves some other special characters (like TÃ©ste TÃªste TÃ£ste).
I have messed a bit (as far as my knowledge allows) with the charset/collation with phpMyAdmin.
Tried setting everything to utf8/utf8_bin to match my local database (that works fine).
Local Server Informations
Everything reads and writes correctly on my local server.
I’m using workbench to manage my local database.
All my pages have the meta charset=“UTF-8” and special characters written on the HTML displays correctly. So that’s probably not the cause. The problem only occours when dealing with the database.
July 28, 2020, 6:52pm
Does your database language (text, values etc.) is an Portuguese or an English?
I could not find the resolution for this problem on previous topics on this forum.
Please, let me know if I need to provide any other information to get support.
There’s an Issue with phpmyadmin which may case that issue.
Can you try to import your database using Php code to see if it works?
Thank you for the input.
But that just doesnt make sense. And as I mentioned, I run the same code, with a MySQL database on my localhost without any weird characters. The characterset/collation is there for it.
Moreover, both PHP and MySQL are global tecnologies. And we are talking about portuguese here. Not some hieroglyph written language.
I believe the issue might be probably related to some configuration on InfinityFree’s MySQL server. But I’m very new to all that stuff.
I think it worked. Even though the database looks all crazy now full of weird characters, my queries seem be functioning correctly so… I guess that’s it. Thank you
July 29, 2020, 8:05pm
@anon19508339 said, it’s a phpMyAdmin issue. It’s not a MySQL issue, it’s not a code issue, it’s not a language issue. phpMyAdmin corrupts special characters for some unknown reason.
If you add special characters through phpMyAdmin, phpMyAdmin will mangle them and add corrupted data to your database. If you add correct data through the PHP code on your website, it will show as corrupted data in phpMyAdmin.
August 13, 2020, 8:12pm
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.