Compatibility with iconv charset names on AIX (patch #1420704, thanks to Bj��rn Wiberg - bwiberg).

This commit is contained in:
Michal Čihař
2006-02-21 18:14:44 +00:00
parent c438a35ac8
commit c69bebb25b
4 changed files with 112 additions and 8 deletions

View File

@@ -144,8 +144,14 @@ function PMA_DBI_convert_message( $message ) {
if ( ! empty( $server_language ) && isset( $encodings[$server_language] ) ) {
if ( function_exists( 'iconv' ) ) {
$message = iconv( $encodings[$server_language],
$GLOBALS['charset'] . $GLOBALS['cfg']['IconvExtraParams'], $message);
if ((@stristr(PHP_OS, 'AIX')) && (@strcasecmp(ICONV_IMPL, 'unknown') == 0) && (@strcasecmp(ICONV_VERSION, 'unknown') == 0)) {
require_once('./liraries/iconv_wrapper.lib.php');
$message = PMA_aix_iconv_wrapper( $encodings[$server_language],
$GLOBALS['charset'] . $GLOBALS['cfg']['IconvExtraParams'], $message);
} else {
$message = iconv( $encodings[$server_language],
$GLOBALS['charset'] . $GLOBALS['cfg']['IconvExtraParams'], $message);
}
} elseif ( function_exists( 'recode_string' ) ) {
$message = recode_string( $encodings[$server_language] . '..' . $GLOBALS['charset'],
$message );