mb_detect_encoding() 을 이용.
예를 들면 아래와 같은 방식으로...
대부분은 EUC-KR과 UTF-8을 넘어갈 일이 없으므로.
echo mb_detect_encoding($a, "UTF-8, EUC-KR").'<br>';
http://kr2.php.net/mb_detect_encoding
'PHP' 카테고리의 다른 글
정규표현식 (0) | 2009.05.06 |
---|---|
php.ini disable_functions (0) | 2009.05.06 |
PHP Command Line 실행시 Arguments (0) | 2009.04.22 |
PHP Command Line 실행 시 new line 출력 문제. (0) | 2009.04.22 |
EUC-KR, UTF-8 인코딩별 언어 바이트 수 (5) | 2009.04.22 |