Определение кодировки текста
$text = file_get_contents($file); mb_detect_order("windows-1251,utf-8"); if(strtolower($enc = mb_detect_encoding($text))!="utf-8") $text = mb_convert_encoding($text, 'utf-8', $enc);
$text = file_get_contents($file); mb_detect_order("windows-1251,utf-8"); if(strtolower($enc = mb_detect_encoding($text))!="utf-8") $text = mb_convert_encoding($text, 'utf-8', $enc);