mb_detect_encoding

 string mb_detect_encoding ( string $str [, mixed $encoding_list = mb_detect_order() [, bool $strict = false ]] ) 

説明

Detect character encoding

戻り値

The detected character encoding or FALSE if the encoding cannot be detected from the given string.