Special Characters Problem

epiz_26295775

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.
Charset: utf8
Collation: utf8_bin

Other Information

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.

Does your database language (text, values etc.) is an Portuguese or an English?

They are in portuguese.

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?

Edit:

3 Likes

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.

Thank you!

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 :slight_smile:

Like @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.

3 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.