From e3783581044f177d9d799662f05807f5c82cacd7 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 7 Oct 2014 07:54:52 +0000 Subject: [PATCH] Remove unused function charset_convert git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@9205 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/stdlib.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/stdlib.php b/lib/stdlib.php index 36b89ab32..e71202b80 100644 --- a/lib/stdlib.php +++ b/lib/stdlib.php @@ -83,7 +83,6 @@ extractSection ($section, $content, $page, $quiet = false, $sectionhead = false) isExternalReferrer() - charset_convert($from, $to, $data) string_starts_with($string, $prefix) string_ends_with($string, $suffix) array_remove($arr,$value) @@ -2000,25 +1999,6 @@ function loadPhpExtension($extension) return extension_loaded($extension); } -function charset_convert($from, $to, $data) -{ - if (strtolower($from) == 'utf-8' and strtolower($to) == 'iso-8859-1') - return utf8_decode($data); - if (strtolower($to) == 'utf-8' and strtolower($from) == 'iso-8859-1') - return utf8_encode($data); - - if (loadPhpExtension("iconv")) { - $tmpdata = iconv($from, $to, $data); - if (!$tmpdata) - trigger_error("charset conversion $from => $to failed. Wrong source charset?", E_USER_WARNING); - else - $data = $tmpdata; - } else { - trigger_error("The iconv extension cannot be loaded", E_USER_WARNING); - } - return $data; -} - function string_starts_with($string, $prefix) { return (substr($string, 0, strlen($prefix)) == $prefix); -- 2.45.0