From 9c523156bbc9d34ff2a16ec3b2c345951fc55287 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 24 Apr 2012 14:18:21 +0000 Subject: merged it_html::fix_encoding in it::any2utf8 --- it_html.class | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'it_html.class') diff --git a/it_html.class b/it_html.class index ed47abd..ece7070 100644 --- a/it_html.class +++ b/it_html.class @@ -258,21 +258,6 @@ function _parse_args($args) } -# internal -function fix_encoding($string, $silent = false) -{ - if (grapheme_strlen($string) === null) - list($string, $error) = array(utf8_encode($string), utf8_encode("incorrectly utf8-encoded: " . trim($string))); - else if (preg_match('/\xc3\x83\xc2[\x84\x9c\xa4\xb6\xbc\xa9\xa0]/', $string)) # Double encoded ÄÖÜäöüéà, UTF8SAFE - list($string, $error) = array(utf8_decode($string), utf8_encode("doubly utf8-encoded: " . trim($string))); - - if ($error && !$silent) - it::error(array('title' => $error, 'skipfiles' => "it_html")); - - return $string; -} - - /** * function div($args...) * Return a