Fix iconv bug, thanks to Matthias Leise
This commit is contained in:
@@ -241,6 +241,9 @@ Version 1.1-alpha5()
|
|||||||
Version 1.0.1 ()
|
Version 1.0.1 ()
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
* Fix utf8 iconv conversion failing on some older PHP setups.
|
||||||
|
Thanks to Matthias Leisi!
|
||||||
|
|
||||||
* Fix multi-authors view only showing first author (garvinhicking)
|
* Fix multi-authors view only showing first author (garvinhicking)
|
||||||
|
|
||||||
* Fix bug sending comment-notification mails to subscribed users
|
* Fix bug sending comment-notification mails to subscribed users
|
||||||
|
|||||||
@@ -537,7 +537,12 @@ function serendipity_fetchReferences($id) {
|
|||||||
function serendipity_utf8_encode($string) {
|
function serendipity_utf8_encode($string) {
|
||||||
if (strtolower(LANG_CHARSET) != 'utf-8') {
|
if (strtolower(LANG_CHARSET) != 'utf-8') {
|
||||||
if (function_exists('iconv')) {
|
if (function_exists('iconv')) {
|
||||||
return iconv(LANG_CHARSET, 'UTF-8', $string);
|
$new = iconv(LANG_CHARSET, 'UTF-8', $string);
|
||||||
|
if ($new !== false) {
|
||||||
|
return $new;
|
||||||
|
} else {
|
||||||
|
return utf8_encode($string);
|
||||||
|
}
|
||||||
} else if (function_exists('mb_convert_encoding')) {
|
} else if (function_exists('mb_convert_encoding')) {
|
||||||
return mb_convert_encoding($string, 'UTF-8', LANG_CHARSET);
|
return mb_convert_encoding($string, 'UTF-8', LANG_CHARSET);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user