I have a simple form that sends (via php) some variables to a mySql database.
The problem is that it's focused to Portuguese audience, and we use several unusual letters, like "ç" and "ã". Whenever someone sends data with those letters, the result is very "garbled" in the phpMyAdmin.
Quick example for a field would be "Escola de Condução Clássica" apears as "4573636f6c6120646520636f6e6475c383c2a7c383c2a36f20436c617373696361" in the phpMyAdmin.
I tried setting the collation to "utf8_bin", with no avail.
Any ideias?
Thank you.
EDIT: Field type is varchar(30) and charset shows as "utf8".
I found out the problem. Turns out I just needed to call my hosting to change the php setting. I wish I had tried this beforehand, but I though it was something wrong on my end. Also, it makes no sense for them to have another encoding other than UTF-8, considering its a Portugal (european) based hosting.
Anyway, if someone gets this error, try asking the hosting about which encoding is used in the php setting (it should have been UTF-8 in my case, might be diferent for you).
And yes, this problem took a while because I eventually ignored it, but I had to do something similar recently in a diferent site (using the same hosting).
ALTER TABLE mytable
CONVERT TO CHARACTER SET utf8