Posted by John Stivenson on 03/08/06 18:29
> Hmmm. Do an "echo mysql_client_encoding();" and see what you get.
It returns latin1.
* * *
I forgot to mention that I had used phpMyAdmin to enter text into
database. If I choose an utf8_* collation I can see text correctly
displayed in phpMyAdmin.
However, reading it using PHP and printing it produces only question
marks.
Today I found a MySQL database which uses UTF-8. Just for test I read a
string from the database and printed it to the web page. It was
displayed correctly!!!
The collation was set to latin1_swedish_ci, but it seems that this
affects only sorting order and not data read from the database.
The same text was unreadable in phpMyAdmin. It displays some strange
characters (two chars per letter).
Maybe there is a bug in phpMyAdmin?
Navigation:
[Reply to this message]
|