summaryrefslogtreecommitdiff
path: root/inc/utf8.php
diff options
context:
space:
mode:
authorSC Yoo <dryoo@live.com>2015-02-20 12:14:07 +0900
committerSC Yoo <dryoo@live.com>2015-02-20 12:14:07 +0900
commit8a8104b258a296c2710caf2911b87403c9ef3d97 (patch)
treed2970a1b25d290745aa8003815a9875fa6d115bf /inc/utf8.php
parenta500e62c4c074fa156db9a5096adee2133176543 (diff)
downloadrpg-8a8104b258a296c2710caf2911b87403c9ef3d97.tar.gz
rpg-8a8104b258a296c2710caf2911b87403c9ef3d97.tar.bz2
Added class-exitsts
Diffstat (limited to 'inc/utf8.php')
-rw-r--r--inc/utf8.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/utf8.php b/inc/utf8.php
index c6a189490..2b6a0c498 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -356,8 +356,12 @@ if(!function_exists('utf8_strtolower')){
* @return string
*/
function utf8_strtolower($string){
- if(UTF8_MBSTRING) return normalizer::normalize(mb_strtolower($string,'utf-8'));
-
+ if(UTF8_MBSTRING) {
+ if (class_exists("Normalizer", $autoload = false))
+ return normalizer::normalize(mb_strtolower($string,'utf-8'));
+ else
+ return (mb_strtolower($string,'utf-8'));
+ }
global $UTF8_UPPER_TO_LOWER;
return strtr($string,$UTF8_UPPER_TO_LOWER);
}