diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -412,7 +412,10 @@ static function grep($pattern, $array, $p = array()) */ function any2utf8($value) { - return grapheme_strlen($value) === null ? utf8_encode($value) : $value; + if (grapheme_strlen($value) === null) + $value = utf8_encode($value); + + return preg_replace('/\xc3\x83\xc2([\xbc\xa9\xa4\xb6\xa8\xa2\xa0\xb4\xaa\xa7\x84\xab\xae\x9c\xaf\x96\xb2\xbb\xb9\x9f])/', '\xc3$1', $value); # fix most common double encodings, UTF8SAFE } /** |