From 72701d3a1a5cf3cc287ccbec4f9cf1334e6d9ed8 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 6 Jan 2004 21:49:42 +0000 Subject: [PATCH] Skip charset conversion code if input charset and output charset are the same. --- ChangeLog | 6 +++++- libraries/charset_conversion.lib.php | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9d5f2fe0..27b4b1918 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,10 +5,14 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-01-06 Alexander M. Turek + * libraries/charset_conversion.lib.php: Skip charset conversion code if + input charset and output charset are the same. + 2004-01-05 Garvin Hicking * browse_foreigners.php, tbl_change.php: Sort key/value pairs as discussed in RFE #868369. Made foreigner window resizable. - * libraries/functions.js: Reverted row marker patch. See RFE #867284 + * libraries/functions.js: Reverted row marker patch. See RFE #867284 for details. * libraries/display_tbl.lib.php, libraries/display_tbl_links.lib.php, libraries/functions.js: Upon clicking on a result row, de/activate diff --git a/libraries/charset_conversion.lib.php b/libraries/charset_conversion.lib.php index dcd332f45..e6d930ec7 100644 --- a/libraries/charset_conversion.lib.php +++ b/libraries/charset_conversion.lib.php @@ -138,7 +138,8 @@ if (isset($cfg['AllowAnywhereRecoding']) function PMA_convert_display_charset($what) { global $cfg, $allow_recoding, $charset, $convcharset; - if (!(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)) { + if (!(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding) + || $convcharset == $charset) { // rabus: if input and output charset are the same, we don't have to do anything... return $what; } else if (is_array($what)) { @@ -207,7 +208,8 @@ function PMA_convert_display_charset($what) { function PMA_convert_charset($what) { global $cfg, $allow_recoding, $charset, $convcharset; - if (!(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)) { + if (!(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding) + || $convcharset == $charset) { // rabus: if input and output charset are the same, we don't have to do anything... return $what; } else { switch ($GLOBALS['PMA_recoding_engine']) {