- prevent from PHP error when iconv doesn't support //IGNORE (#1486375)
| | |
| | | |
| | | // convert charset using iconv module |
| | | if (function_exists('iconv') && $from != 'UTF-7' && $to != 'UTF-7') { |
| | | $_iconv = iconv($from, $to . '//IGNORE', $str); |
| | | $_iconv = @iconv($from, $to . '//IGNORE', $str); |
| | | if ($_iconv !== false) { |
| | | return $_iconv; |
| | | } |
| | |
| | | if (function_exists('mb_convert_encoding') && ($res = mb_convert_encoding($input, 'UTF-8', 'UTF-8')) !== false) |
| | | return $res; |
| | | |
| | | if (function_exists('iconv') && ($res = iconv('UTF-8', 'UTF-8//IGNORE', $input)) !== false) |
| | | if (function_exists('iconv') && ($res = @iconv('UTF-8', 'UTF-8//IGNORE', $input)) !== false) |
| | | return $res; |
| | | |
| | | $regexp = '/^('. |