From: <var...@us...> - 2014-10-07 07:55:00
|
Revision: 9205 http://sourceforge.net/p/phpwiki/code/9205 Author: vargenau Date: 2014-10-07 07:54:52 +0000 (Tue, 07 Oct 2014) Log Message: ----------- Remove unused function charset_convert Modified Paths: -------------- trunk/lib/stdlib.php Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-10-06 17:17:24 UTC (rev 9204) +++ trunk/lib/stdlib.php 2014-10-07 07:54:52 UTC (rev 9205) @@ -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 @@ 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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |