Re: charaters from geoname UTF8 table display as latin1 - how to correct this?
Posted by: Ivan Gutschy
Date: March 21, 2011 05:07PM

I have prepared printscreen of phpmyadmin table:
http://img14.imageshack.us/i/citiesc.jpg/

You can notice how some city names have special characters visible in phpmyadmin.
however, those characters are displayes as ?? (question marks) on the web site.

I have tried with:
mysql_set_charset('utf8',$dbc);

mysql connection used so far looks like this:
$dbc = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die ('Could not connect to MySQL: ' . mysqli_connect_error() );

i have tried to modify to use mysql_set_characters it but it didn't work:
$dbc=@mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD);
@mysql_set_charset('utf8',$dbc);
$dbc2=@mysql_select_db(DB_NAME,$dbc);

I have played with most of the options like set names within query and so on either it doesn't work, or it breaks my query.

I would appreciate if you could tell me what commands or querys to run and their proper syntax, since I am not an expert programmer. Thank you :D

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.