You are here: Re: UTF-8 and question marks « PHP Programming Language « IT news, forums, messages
Re: UTF-8 and question marks

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация