]> git.mjollnir.org Git - s9y.git/commitdiff
Also utilize mb* functions for UTF-8 recoding, patch by Tadashi Jokagi
authorgarvinhicking <garvinhicking>
Wed, 3 Aug 2005 11:11:41 +0000 (11:11 +0000)
committergarvinhicking <garvinhicking>
Wed, 3 Aug 2005 11:11:41 +0000 (11:11 +0000)
docs/NEWS
include/functions.inc.php

index 753e669abe7459e38cb67dc71538714ac26c3919..67d83dd68a322dfc4026a109a070a53220ce244d 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,8 @@
 Version 0.9 ()
 ------------------------------------------------------------------------
 
+    * Allow UTF-8 recoding using mb_* functions (Tadashi Jokagi)
+
     * Allow to switch charsets ("Native" / "UTF-8"). (garvinhicking)
 
     * Permissions: The permission "adminImagesViewOthers" now controls
index 2c2d49edb7716c225b7864f38969671101caa2d3..d0616721bde8c863895b6d4b5bcc9f32ff4c478f 100644 (file)
@@ -261,6 +261,8 @@ function serendipity_utf8_encode($string) {
     if (strtolower(LANG_CHARSET) != 'utf-8') {
         if (function_exists('iconv')) {
             return iconv(LANG_CHARSET, 'UTF-8', $string);
+        } else if (function_exists('mb_convert_encoding')) {
+            return mb_convert_encoding($string, 'UTF-8', LANG_CHARSET);
         } else {
             return utf8_encode($string);
         }