Today i noticed that special chars (UTF8) was not displayed correctly, so i made the following mod in server/lib/database.php
Change this
- Code: Select all
public function connect($conn_string, $username, $password, $error_mode)
{
if(isset($conn_string, $username, $password, $error_mode))
{
try
{
$this->conn = new PDO($conn_string, $username, $password);
$this->conn->setAttribute(PDO::ATTR_ERRMODE, $error_mode);
return true;
}
catch(PDOException $e)
{
//print $e->getMessage();
}
}
return false;
} // end connect()
in this
- Code: Select all
public function connect($conn_string, $username, $password, $error_mode)
{
if(isset($conn_string, $username, $password, $error_mode))
{
try
{
$this->conn = new PDO($conn_string, $username, $password);
//
// Mod by sosy
//
$this->conn->exec('SET CHARACTER SET utf8');
//
//
//
$this->conn->setAttribute(PDO::ATTR_ERRMODE, $error_mode);
return true;
}
catch(PDOException $e)
{
//print $e->getMessage();
}
}
return false;
} // end connect()
For those who are working with Todd's new Membersystem, and who need special chars (i live in Germany) like ä,ü etc. its probably usefull.
Regards
Sosy
