From: garvinhicking Date: Wed, 3 Aug 2005 11:11:41 +0000 (+0000) Subject: Also utilize mb* functions for UTF-8 recoding, patch by Tadashi Jokagi X-Git-Tag: 0.9~243 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=880624cbb227d56431dbadf9f9d460d17ef63fd6;p=s9y.git Also utilize mb* functions for UTF-8 recoding, patch by Tadashi Jokagi --- diff --git a/docs/NEWS b/docs/NEWS index 753e669..67d83dd 100644 --- 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 diff --git a/include/functions.inc.php b/include/functions.inc.php index 2c2d49e..d061672 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -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); }