<?php $str = '%D0%9F%D0%B0%D1%80%D0%BE%D0%BB%D1%8C'; $str = urldecode($str); echo mb_detect_encoding($str), "\n", $str; ?>