I have a url string which i encode to utf8 at client side. When data recieved in server with my php script i can not see greek language characters! Could you please help me to convert them? data will be saved in mysql database .
When querying an MySQL database with PHP you also need to specify UTF-8 for the connection, like so:
mysql_query( "SET NAMES utf8", $database_connection );
mysql_query( "SET CHARACTER SET utf8", $database_connection );
Also make sure, that your database tables are encoded in UTF-8 (so you can see the greek characters when looking directly at the database tables) and you set UTF-8 headers via PHP.
There is a nice explanation for PHP, UTF-8 and several databases here: PHP and UTF-8 Howto
i figured out after hours that the configuration on the mysql server was ok. the problem was in the php script mysql_query( "SET NAMES utf8", $database_connection ); mysql_query( "SET CHARACTER SET utf8", $database_connection );
moontear was right about the lines but for me only worked by using the first line only. The second line caused the ??? on the database.
Thank you guys anyway.