I set all about encoding to utf8. but browser show me '???????'. My settings are below.
MySQL "show variables like 'c%'"
character_set_client | utf8
character_set_connection | utf8
character_set_database | utf8
.... (all utf8)
MySQL my.cnf
[client]
default-character-set = utf8
[mysqld]
init_connect="SET collation_connection = utf8_general_ci"
init_connect="SET names utf8"
character-set-server = utf8
collation-server = utf8_general_ci
[mysql]
default-character-set = utf8
In all my PHP file included:
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
Apache2 httpd.conf
AddDefaultCharset Off (if utf-8, show me '???' ,too)
In MySQL console, (database is dumped)
SELECT name from campagin LIMIT 1
=> print in working order, not '????'
I don't know what is problem.
For reference, I test this case.. in test.php
<?php
mysql_connect('localhost','root',ROOT_PW);
mysql_select_db(TEST_DB_NAME);
mysql_query("INSERT INTO a SET msg='안녕하세요'"); // char is KOREAN, meaning 'Hi'
$res = mysql_query("SELECT msg FROM a LIMIT 1");
$row = mysql_fetch_assoc($res);
echo $row['msg'];
?>
=> this print '안녕하세요' in working order not '????'
but in MySQL console
"SELECT msg FROM a LIMIT 1"
=> print not '안녕하세요' but abnormally '안녕하세요'
ADDED : in mysql console
"SHOW CREATE TABLE a"
=> Table | Create Table
a | CREATE TABLE `a` ( 'msg' varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8