When attempting to add a description using emojis in a planner entry, the data was not saved after the initial emoji position. (Emojis with 4 digits hex work, but those with 5 digits do not.)
After some research, I discovered that it must deal with SQL connections and data collations.
So I try to alter all tables in my local database to use the utf8mb4_0900_ai_ci collation and configure my local server to connect as utf8mb4. That has resolved the difficulties.
MySqlConnector.php - line 49
$connection = new PDO($dsn, $config['databaseUsername'], $config['databasePassword'],
array(
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8mb4"
)
);
and query this
ALTER TABLE `gibbonPlannerEntry` COLLATE='utf8mb4_0900_ai_ci',CONVERT TO CHARSET utf8mb4;
To Reproduce
- Navigate to the 'Add Lesson Plan' page.
- Complete all required fields.
- Insert emojis into the description. (Noted that it works if you use advanced HTML code, but simply copy emojis and paste them do not)
- Save.
- Notice that the field was not completely saved.
Expected Behavior
- The field was completely saved with emojis.
System
- Gibbon v22.0.01
- MySQL v8.0.26
- PHP v7.3.31
When attempting to add a description using emojis in a planner entry, the data was not saved after the initial emoji position. (Emojis with 4 digits hex work, but those with 5 digits do not.)
After some research, I discovered that it must deal with SQL connections and data collations.
So I try to alter all tables in my local database to use the utf8mb4_0900_ai_ci collation and configure my local server to connect as utf8mb4. That has resolved the difficulties.
MySqlConnector.php - line 49
and query this
To Reproduce
Expected Behavior
System