if (function_exists("mb_detect_encoding")) { $encoding=mb_detect_encoding($title); } else { $encoding="UTF-8"; }