utf-8 한글깨짐

DB관리 2010.05.17 16:22


/etc/my.cnf 파일 설정

[mysqld]
skip-character-set-client-handshake=1
init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_general_ci



[mysql]
default-character-set=utf8


[client]
default-character-set=utf8



db 접속문에 추가
mysql_connect($dbhost,$dbuser,$dbpassword);
@mysql_select_db($database) or die( "Unable to select database");
mysql_query("set names utf8");  // 이거 추가

설정

트랙백

댓글