MySQL 에서 Select 질의시에는 잘 읽어들이나, inser, update 시에는 깨질 경우이다.
MySQL 서버 설정에 다음과 같은 설정이 필요하다.
#/etc/my.cnf
[mysqld]
...
default-character-set=utf8
default-collation=utf8_general_ci
...
물론 UTF-8 관련 설정들도 빠짐없는지 확인해야했음은 물론이다. :)
- Databse, Table 의 캐릭터셋
- HttpServletRequest 의 인코딩
- Java 런타임시 -Dfile.encoding=UTF-8 (이사항은 DB 랑은 직접적인 연관은 없다)
참조 : http://mathiasrichter.blogspot.kr/2009/10/character-encoding-utf-8-with.html