View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Support full unicode in MySQL databases - Page 2 - ProjeQtOr

Prochaines Sessions

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)
 

13 mai 2025 (10h30-12h)

5 juin 2025 (16h-17h30)

 
 

Planifiez avec ProjeQtOr

14 et 15 mai 2025 (9h-12h30)

18 et 19 juin 2025 (9h-12h30)

 
 

Administrez avec ProjeQtOr

20 et 21 mai (9h-12h30)

25 et 26 juin (9h-12h30)

 

 

 

Support full unicode in MySQL databases

More
23 Déc 2016 13:41 #7 by babynus
Yes, it is an issue we already identified.
Although tables are defined in UTF8, if server is on windows an is not correctly configured in UTF8 data is stored in CP1252 (windows format).
It is transparent in ProjeQtOr, because reverse transfomation is automatically done by MySql when reading data.
But if you read data through other tool (such as PhpMyAdmin) you see that accentuated chars are not correct.
This issue does not happen on Linux, always working by defaut on UTF8.

We fixed this in V4.4 by forcing "set names UTF8" on each connection.
But we force this (by setting $enforceUTF8 to true) only for new installations, to avoid erroneous display, as setting this on not converted database would result in lack of reverse transformation for existing data.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
23 Déc 2016 14:20 #8 by babynus
I had tests to be sure...

And very strangely it seems that $enforceUTF8 is not positionned any more by default on new installs : I will investigate

But on my new install, all was fine, using MySql 5.7... with defaut configuration (no specific UTF8 config as I used to do on previous MySql versions)
No issue with phpMyAdmin, export to utf8 fine, all OK.
And setting $enforceUTF8 does not change anything.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
23 Déc 2016 14:23 - 23 Déc 2016 14:25 #9 by papjul
I can confirm I installed ProjeQtOr on version 4.5.7 and never received the $enforceUTF8 parameter. I installed ProjeQtOr on a CentOS machine and the defaults character set for MySQL are still latin1/cp1252, this is not dependant on the OS but on the MySQL/MariaDB config file, which always defaults to cp1252.
Edit: Maybe MySQL 5.7 changes this default? I don't know, I'm using MariaDB.
Last edit: 23 Déc 2016 14:25 by papjul.

Please Connexion or Create an account to join the conversation.

More
23 Déc 2016 15:49 #10 by babynus
Found the issue.

Will be fixed on next patch / version

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
27 Déc 2016 10:43 #11 by papjul
Found out how to fix the issue (or how to convert the cp1252 data stored as UTF8, as UTF8MB3).

Note that it will NOT work if you have a mixed cp1252/UTF8 database. It was my case for 8 lines related to the same activity in history table, I don't know how this happened but the activity didn't exist anymore so I just deleted the lines.

This is a proof of concept and should only be used by advanced users on a dev/pre-prod environment before going production.

1) Export your database with mysqldump command line. You should get a file in UTF8.
2) Open the .sql file with Notepad++ or a software which is able to convert/encode from/to CP1252/ANSI and UTF8.
3) In "Encode" menu, you should see "Encode as UTF-8 (without BOM)" ticked.
4) Tick "Convert to ANSI". Nothing should have changed.
5) Tick "Encode as UTF-8 (without BOM)". Magic, all your characters should be converted.
6) $enforceUTF8=true; in ProjeQtOr config file.
7) Run the .sql file on your database or copy the contents of the .sql file to your query window and execute. It will fail if you had UTF8 characters before converting in your database. MySQL will tell you which lines fail.
8) Test this database on your dev/pre-prod environment.

So far so good during my tests.
The following user(s) said Thank You: babynus

Please Connexion or Create an account to join the conversation.

More
27 Déc 2016 11:04 #12 by babynus
Thanks for sharing this trick.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.087 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.