From 880624cbb227d56431dbadf9f9d460d17ef63fd6 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Wed, 3 Aug 2005 11:11:41 +0000 Subject: [PATCH] Also utilize mb* functions for UTF-8 recoding, patch by Tadashi Jokagi --- docs/NEWS | 2 ++ include/functions.inc.php | 2 ++ 2 files changed, 4 insertions(+) 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); } -- 2.39.5