Again I have a strange and complicated problem.
I am working on converting my MySQL databases (and everything else on my server) to UTF-8, to avoid the need to convert text when receiving and putting text into different databases.
I think I partially succeeded because it SHOW VARIABLES LIKE 'character_set%'returns:
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server utf8
character_set_system utf8
But still mysql_client_encoding($con);returns latin1, and at the output, each special character is replaced by. I came to the conclusion that the client or the connection between PHP and the MySQL database uses latin1, although I specified utf-8 in the document header and in my.ini with the following code:
character-set-server = utf8
character-set-client = utf8
default-character-set = utf8
edit: I added the settings above for both [client], [mysqld], and [mysql]
mysql_query('SET NAMES utf8;'); mysql_set_charset("utf8");, , , .
- , PHP ( latin1) utf-8?
, Windows 2003 Server Apache 2.