I am moving our system over to use the newish Reports module, and I discovered that I am unable to enter unicode characters into email templates. For example, in the subject line, I enter:
{{reportName|title}} của bạn
After clicking Submit, the following is saved:
{{reportName|title}} c?a b?n
I have not experienced problems with encoding previously in Gibbon.
I am running Gibbon 27.0.01 (using MariaDB 10.11.9 and PHP 8.3).
HI @dcowens76 That is odd, I’ve tested it locally on v27.0.01 and it’s working as expected, saving a string such as của bạn correctly and displaying it correctly in both the editor and the email itself. Can you check the collation and encoding of the gibbonEmailTemplate table, it should be utf8_general_ci by default.
Just an update on how I fixed this. I queried the encoding for the table using this query:
SELECT CCSA.character_set_name FROM information_schema.`TABLES` T,
information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
WHERE CCSA.collation_name = T.table_collation
AND T.table_schema = "gibbon"
AND T.table_name = "gibbonEmailTemplate";
And I changed the encoding using this query:
ALTER TABLE gibbonEmailTemplate CONVERT TO CHARACTER SET utf8mb4;
(MariaDB did not accept utf8_general_ci, and utf8mb4 was the encoding of the database.)