[php-blog-cvs] r1043 - in trunk: docs include
A reliable, secure & extensible PHP blog | Not mainstream since 2002
Brought to you by:
garvinhicking,
jhermanns
From: garvinhicking at B. <gar...@ma...> - 2006-03-31 08:30:22
|
Author: garvinhicking Date: 2006-03-31 10:30:15 +0200 (Fri, 31 Mar 2006) New Revision: 1043 Modified: trunk/docs/NEWS trunk/include/functions_permalinks.inc.php Log: fix bug: [ 1461754 ] Permalinks broken for some UTF8 characters Modified: trunk/docs/NEWS =================================================================== --- trunk/docs/NEWS 2006-03-31 08:25:08 UTC (rev 1042) +++ trunk/docs/NEWS 2006-03-31 08:30:15 UTC (rev 1043) @@ -51,6 +51,9 @@ Version 1.0 () ------------------------------------------------------------------------ + * Fix UTF-8 encoding of $i18n_filename_* variables for building + permalinks (Bug #1461754, Thanks to Kim Sullivan) (garvinhicking) + * Fix messing up comment count when deleting a trackback from admin panel (garvinhicking) Modified: trunk/include/functions_permalinks.inc.php =================================================================== --- trunk/include/functions_permalinks.inc.php 2006-03-31 08:25:08 UTC (rev 1042) +++ trunk/include/functions_permalinks.inc.php 2006-03-31 08:30:15 UTC (rev 1043) @@ -97,18 +97,24 @@ 'y'); - if (LANG_CHARSET == 'UTF-8') { - // URLs need to be 7bit - since this function takes care of the most common ISO-8859-1 - // characters, try to UTF8-decode the string first. - $str = utf8_decode($str); - } - if (isset($GLOBALS['i18n_filename_from'])) { // Replace international chars not detected by every locale. // The array of chars is defined in the language file. $str = str_replace($GLOBALS['i18n_filename_from'], $GLOBALS['i18n_filename_to'], $str); + + if (LANG_CHARSET == 'UTF-8') { + // URLs need to be 7bit - since this function takes care of the most common ISO-8859-1 + // characters, try to UTF8-decode the string first. + $str = utf8_decode($str); + } } else { // Replace international chars not detected by every locale + if (LANG_CHARSET == 'UTF-8') { + // URLs need to be 7bit - since this function takes care of the most common ISO-8859-1 + // characters, try to UTF8-decode the string first. + $str = utf8_decode($str); + } + $str = str_replace($from, $to, $str); } |