diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index ec0d2bb76f..c2ef1884f3 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -413,19 +413,12 @@ EOF; /** * Returns an UTF-8 and HTML encoded string + * + * @deprecated since version 2.7, to be removed in 3.0. */ protected static function utf8Htmlize($str) { - if (!preg_match('//u', $str) && function_exists('iconv')) { - set_error_handler('var_dump', 0); - $charset = ini_get('default_charset'); - if ('UTF-8' === $charset || $str !== @iconv($charset, $charset, $str)) { - $charset = 'CP1252'; - } - restore_error_handler(); - - $str = iconv($charset, 'UTF-8', $str); - } + trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); return htmlspecialchars($str, ENT_QUOTES | (PHP_VERSION_ID >= 50400 ? ENT_SUBSTITUTE : 0), 'UTF-8'); }