diff options
-rw-r--r-- | it.class | 2 | ||||
-rwxr-xr-x | tests/it.t | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -415,7 +415,7 @@ function any2utf8($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 + 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 } /** @@ -369,4 +369,6 @@ is(it::any2utf8( ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ', "it::any2utf8 latin1 input (exhaustive alphabet)"); +is(it::any2utf8(utf8_encode("ü")), "ü", "it::any2utf8 double encoding"); + ?> |