Skip to content
Snippets Groups Projects
Commit 7b27328d authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

La gestion des bases en UTF8 sera au programme de la prochaine version

parent 76f034de
No related branches found
No related tags found
No related merge requests found
......@@ -158,13 +158,6 @@ class DoliDb
$this->db = $this->connect($host, $user, $pass, $name, $newlink);
if ($this->db)
{
// Si client connect avec charset different de celui de la base Dolibarr
// (La base Dolibarr a t force en this->forcecharset l'install)
if (mysql_client_encoding ( $this->db ) != $this->forcecharset)
{
$this->query("SET NAMES '".$this->forcecharset."'", $this->db);
$this->query("SET CHARACTER SET ". $this->forcecharset);
}
$this->connected = 1;
$this->ok = 1;
}
......@@ -185,6 +178,14 @@ class DoliDb
$this->database_selected = 1;
$this->database_name = $name;
$this->ok = 1;
// Si client connect avec charset different de celui de la base Dolibarr
// (La base Dolibarr a t force en this->forcecharset l'install)
/*if (mysql_client_encoding ( $this->db ) != $this->getDefaultCharacterSetDatabase())
{
$this->query("SET NAMES '".$this->forcecharset."'", $this->db);
$this->query("SET CHARACTER SET ". $this->forcecharset);
}*/
}
else
{
......
......@@ -160,12 +160,6 @@ class DoliDb
if ($this->db)
{
// Si client connect avec charset different de celui de Dolibarr
/*if (mysqli_client_encoding ( $this->db ) != $this->forcecharset)
{
$this->query("SET NAMES '".$this->forcecharset."'", $this->db);
$this->query("SET CHARACTER SET '".$this->forcecharset."'", $this->db);
}*/
$this->connected = 1;
$this->ok = 1;
}
......@@ -186,6 +180,13 @@ class DoliDb
$this->database_selected = 1;
$this->database_name = $name;
$this->ok = 1;
// Si client connect avec charset different de celui de Dolibarr
/*if (mysqli_client_encoding ( $this->db ) != $this->getDefaultCharacterSetDatabase())
{
$this->query("SET NAMES '".$this->forcecharset."'", $this->db);
$this->query("SET CHARACTER SET '".$this->forcecharset."'", $this->db);
}*/
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment