Skip charset conversion code if input charset and output charset are the same.

This commit is contained in:
Alexander M. Turek
2004-01-06 21:49:42 +00:00
parent e1a7b0d74c
commit 72701d3a1a
2 changed files with 9 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2004-01-06 Alexander M. Turek <therising@derrabus.de>
* libraries/charset_conversion.lib.php: Skip charset conversion code if
input charset and output charset are the same.
2004-01-05 Garvin Hicking <returnofthegarv@supergarv.de> 2004-01-05 Garvin Hicking <returnofthegarv@supergarv.de>
* browse_foreigners.php, tbl_change.php: Sort key/value pairs * browse_foreigners.php, tbl_change.php: Sort key/value pairs
as discussed in RFE #868369. Made foreigner window resizable. as discussed in RFE #868369. Made foreigner window resizable.

View File

@@ -138,7 +138,8 @@ if (isset($cfg['AllowAnywhereRecoding'])
function PMA_convert_display_charset($what) { function PMA_convert_display_charset($what) {
global $cfg, $allow_recoding, $charset, $convcharset; 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; return $what;
} }
else if (is_array($what)) { else if (is_array($what)) {
@@ -207,7 +208,8 @@ function PMA_convert_display_charset($what) {
function PMA_convert_charset($what) { function PMA_convert_charset($what) {
global $cfg, $allow_recoding, $charset, $convcharset; 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; return $what;
} else { } else {
switch ($GLOBALS['PMA_recoding_engine']) { switch ($GLOBALS['PMA_recoding_engine']) {