From a20d541fb49c6c7d031a1c0852a584b7cf3adab7 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 14 Nov 2018 12:31:35 +0100 Subject: [PATCH] removed default charset, set to auto --- pandora_console/include/db/mysql.php | 10 +++++++--- pandora_console/include/functions_db.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index 45f0a22db6..9982ec24fb 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -14,7 +14,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = "utf8") { +function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = null) { global $config; if ($host === null) @@ -42,7 +42,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, } db_change_cache_id ($db, $host); - mysqli_set_charset($connect_id, $charset); + if (isset($charset)) { + mysqli_set_charset($connect_id, $charset); + } mysqli_select_db($connect_id, $db); } @@ -54,7 +56,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, db_change_cache_id ($db, $host); - @mysql_set_charset($connect_id, $charset); + if (isset($charset)) { + @mysql_set_charset($connect_id, $charset); + } mysql_select_db($db, $connect_id); } diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index eca1a67eeb..386673dc53 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -43,7 +43,7 @@ function db_select_engine() { } } -function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = "utf8") { +function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = null) { global $config; static $error = 0;