I hope someone can help me here . It is driving me crazy.
For the first time I am writing an application with utf-8 in the application and in the database.
for all my outputs I am using
htmlentities($data,ENT_QUOTES,'UTF-8')
also I am using in the header
meta http-equiv="content-type" content="text/html;charset=utf-8"
The database is all utf8 and utf8-general_ci (every character field with utf8)
Inside the application all the Spanish characters look fine. But if I see those characters using phpmyadmin or Navicat they look weird.
Before I used latin1 and spanish characters will look fine of the web and on the database and i did not have to do the htmlentities (altought I should have use it anayway).
What am I missing?? What is the secret formula to get this working??
UTF8 characters problem
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
I don't get what your asking. If everything is working in a browser, then everything is fine. If they are messing up in the database don't worry about it as long as it comes back correct.
Edit: But if you really want it fixed read this: http://www.phpwact.org/php/i18n/utf-8/mysql
Edit: But if you really want it fixed read this: http://www.phpwact.org/php/i18n/utf-8/mysql
mysql clients need to be told character set
There is a setup in Navicat that allows you to force the enconding you are looking. I change it to be utf 8 and now when I work on navicat i see the characters as expected.
I dont know how to do the same thing on phpmyadmin??
The main problem was that I was not sure whos fault was it. I thought the mysql clients will automatically detect the encoding and show the correct character set. I was wrong.
I dont know how to do the same thing on phpmyadmin??
The main problem was that I was not sure whos fault was it. I thought the mysql clients will automatically detect the encoding and show the correct character set. I was wrong.