Hi,
I have some problem with utf8 character on my mysql database. It is exactly the same issue explained here:
I have done everything from this post but i have always the problem.
So I modified Sql.php as follow:
//if (isset($enforceUTF8) and $enforceUTF8) {
self::$connexion->query("SET NAMES utf8");
// }
After this, all is good. I check my parameter.php file and $enforceUTF8 = true is set.
Why $enforceUTF8 is not load as paramDbType from the GlobalParameter ?
because if I add this code before, everything ok
$enforceUTF8 = Parameter::getGlobalParameter('enforceUTF8'); // load enforceUTF8 parameter
// Could solve some erroneous default storing in non utf8 format
if (isset($enforceUTF8) and $enforceUTF8) {
self::$connexion->query("SET NAMES utf8");
}
Have a nice day
Environment
PROJEQTOR
==========
Version 5.0.5MySQL
======
Serveur: Localhost via UNIX socket
Version du serveur: 5.5.40-0+wheezy1
Version du protocole: 10
Jeu de caractères pour MySQL: UTF-8 Unicode (utf8)WEB SERVER
===========
Apache/2.2.22 (Debian)
Version du client MySQL: 5.5.40
Extension PHP: mysqliPHP
===
PHP 5.4.36-0+deb7u1 (cli) (built: Dec 31 2014 07:31:33)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
You are right, there is an issue :
In Sql.php, line 246, add 1 line after getConnection definition :
private static function getConnection() {
global $enforceUTF8;
Why $enforceUTF8 is not load as paramDbType from the GlobalParameter ?
Because it is a DB paraemter, and all db parameters are stored in parameters.php file.
That works !
Thank you !