summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2015-01-29 15:09:45 +0100
committerUrban Müller2015-01-29 15:09:45 +0100
commit1d33e1cf3e9fe33d38012e29a5555e46ba24468c (patch)
tree098f48489b26aba1ccd183409b2d8ef87ad1652e
parent2b889af3ab520e8c20881cb840fbfba5c27e87d3 (diff)
downloaditools-1d33e1cf3e9fe33d38012e29a5555e46ba24468c.tar.gz
itools-1d33e1cf3e9fe33d38012e29a5555e46ba24468c.tar.bz2
itools-1d33e1cf3e9fe33d38012e29a5555e46ba24468c.zip
kill invisible soft hypens in any2utf8
-rw-r--r--it.class1
1 files changed, 1 insertions, 0 deletions
diff --git a/it.class b/it.class
index ed12bdd..2ac8388 100644
--- a/it.class
+++ b/it.class
@@ -438,6 +438,7 @@ static function any2utf8($value, $errprefix = "")
list($value, $error) = array(it::any2utf8(preg_replace_callback('/\xc3[\x82\x83]\xc2[\x82\x83\xbc\xa9\xa4\xb6\xa8\xa2\xa0\xb4\xaa\xa7\x84\xab\xae\x9c\xaf\x96\xb2\xbb\xb9\x9f]/', function($m) {return utf8_decode($m[0]);}, $value)), $errprefix ? "$errprefix: double utf8-encoding. input=$value" : "");
if (preg_match('/\xef\xb7[\x90-\xaf]|\xef\xbf[\xbe\xbf]/', $value))
list($value, $error) = array(preg_replace('/\xef\xb7[\x90-\xaf]|\xef\xbf[\xbe\xbf]/', " ", $value), "forbidden utf-8 character. input=$value");
+ $value = preg_replace('/\xc2\xad/', '', $value);
if ($error && $errprefix)
it::error(array('title' => "$errprefix: " . trim($error)));
}