070-8260-2526

9 ~ 6

352-0331-1626-83

:ũڸ


ֹ
Ȩ > > ֹ

ȸ 7033
MySQL PHP UTF-8 ڵϱ
Apache + PHP + MySQL Ͽ Ȩ ٹ ؾ ִ.

euckr Ͽ PHPå ų euckr ڵ Ǿ ִ .

ֱ ȭ ڸ ͳ̶ ϱ ڵ õϰ ִ.

UTF-8 ڵϱ غ

MySQL charset utf8  ٲ Ѵ. ϴ APM7 default charset utf8̶ ٲ ʿ䰡 ..
alter database ̸ character set utf8 collate utf8_unicode_ci

Ǵ MySQL my.ini ( )

[client]
default-character-set=utf8

[mysqld]
default-character-set=utf8

[mysqldump]
default-character-set=utf8

[mysql]
default-character-set=utf8


߰, database utf8 Ǿ

php ڵ ANSI UTF-8 ٲָ ȴ.

Editplus Ѵٸ, ڵ ִ.


ó: http://hyogeun.tistory.com/50 [SW Expert Ͽ]


  open

-> ڵ -> ټ ڵ




ڵ ָ ȴ.

׸ PHP ȿ Headκп META

(head ʰ ٸ ִ, ڵ head )


< html>
< title></title>
< head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><html>
< body>
< /body>
< html>




php



mysql_query("SET NAMES UTF8');

߰ϸ ȴ.

mysql charset UTF8̰ php Ǵ charset UTF-8̹Ƿ ؾ Ѵ.
DB ϴ ڵ euckr, utf8ó php html ϴ ڵ utf-8̳ euc-kr̴.


ó: http://hyogeun.tistory.com/50 [SW Expert Ͽ]