From 6f442ea296fc86970414a578050861d970c7072f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 23 Nov 2008 13:08:06 +0000 Subject: [PATCH] "check if we really need to convert the charset, as it's not perfect and can do some damage" --- phpgwapi/inc/class.db_backup.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpgwapi/inc/class.db_backup.inc.php b/phpgwapi/inc/class.db_backup.inc.php index 49ac4d50a0..4fae4a9f7f 100644 --- a/phpgwapi/inc/class.db_backup.inc.php +++ b/phpgwapi/inc/class.db_backup.inc.php @@ -209,6 +209,11 @@ class db_backup // needed if mbstring.func_overload > 0, else eg. substr does not work with non ascii chars @ini_set('mbstring.internal_encoding',$charset); + // check if we really need to convert the charset, as it's not perfect and can do some damage + if ($convert_to_system_charset && !strcasecmp($convert_to_system_charset,$charset)) + { + $convert_to_system_charset = false; // no conversation necessary + } // set the DB's client encoding (for mysql only if api_version >= 1.0.1.019) if ((!$convert_to_system_charset || $this->db->capabilities['client_encoding']) && (substr($this->db->Type,0,5) != 'mysql' || !is_object($GLOBALS['egw_setup']) ||