fix: add --default-character-set=utf8mb4 to mysql calls in initialize…#117
Open
Friesen-Automation wants to merge 2 commits into
Open
fix: add --default-character-set=utf8mb4 to mysql calls in initialize…#117Friesen-Automation wants to merge 2 commits into
Friesen-Automation wants to merge 2 commits into
Conversation
…Database() Fixes Dolibarr#115 Problem: During auto-installation (DOLI_INSTALL_AUTO=1), the mysql client connects without an explicit character set. This causes the client to default to latin1, while the SQL data files are UTF-8 encoded. As a result, multi-byte UTF-8 characters (e.g. German umlauts ä, ö, ü, French accents é, è, ç, and other non-ASCII characters) are double-encoded and stored incorrectly in the database. Example: "Württemberg" is stored as "Württemberg" Fix: Added --default-character-set=utf8mb4 to all mysql import calls inside initializeDatabase(). This ensures the client correctly interprets the UTF-8 encoded SQL files during the initial database setup. Affected languages: all languages using non-ASCII characters (German, French, Spanish, etc.) Tested with: MariaDB 10.11, Dolibarr latest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…Database()
Fixes #115
Problem:
During auto-installation (DOLI_INSTALL_AUTO=1), the mysql client connects without an explicit character set. This causes the client to default to latin1, while the SQL data files are UTF-8 encoded.
As a result, multi-byte UTF-8 characters (e.g. German umlauts ä, ö, ü, French accents é, è, ç, and other non-ASCII characters) are double-encoded and stored incorrectly in the database.
Example: "Württemberg" is stored as "Württemberg"
Fix:
Added --default-character-set=utf8mb4 to all mysql import calls inside initializeDatabase(). This ensures the client correctly interprets the UTF-8 encoded SQL files during the initial database setup.
Affected languages: all languages using non-ASCII characters (German, French, Spanish, etc.)
Tested with: MariaDB 10.11, Dolibarr latest