mb_* functions don't know some windows-* charsets (bug #940638).
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2004-04-26 Michal Cihar <michal@cihar.com>
|
||||
* libraries/string.lib.php: mb_* functions don't know some windows-*
|
||||
charsets (bug #940638).
|
||||
|
||||
2004-04-22 Michal Cihar <michal@cihar.com>
|
||||
* libraries/export/sql.php: Invalid SQL on empty table export (bug
|
||||
#939918).
|
||||
|
@@ -41,7 +41,8 @@ function PMA_strlen($string)
|
||||
{
|
||||
if (defined('PMA_MULTIBYTE_ENCODING')) {
|
||||
return mb_strlen($string);
|
||||
} elseif($GLOBALS['PMA_has_mbstr']) {
|
||||
// windows-* charsets are not multibyte and not supported by mb_*
|
||||
} elseif($GLOBALS['PMA_has_mbstr'] && substr($GLOBALS['charset'],0,8) != 'windows-') {
|
||||
return mb_strlen($string, $GLOBALS['charset']);
|
||||
} else {
|
||||
return strlen($string);
|
||||
@@ -65,7 +66,7 @@ function PMA_substr($string, $start, $length = 2147483647)
|
||||
{
|
||||
if (defined('PMA_MULTIBYTE_ENCODING')) {
|
||||
return mb_substr($string, $start, $length);
|
||||
} elseif($GLOBALS['PMA_has_mbstr']) {
|
||||
} elseif($GLOBALS['PMA_has_mbstr'] && substr($GLOBALS['charset'],0,8) != 'windows-') {
|
||||
return mb_substr($string, $start, $length, $GLOBALS['charset']);
|
||||
} else {
|
||||
return substr($string, $start, $length);
|
||||
|
Reference in New Issue
Block a user