Investigate charset issue with database #13

Closed
opened 2020-07-21 20:27:00 +00:00 by decentral1se · 8 comments
Owner

If you post an emoji or sometimes an image, the database explodes...

If you post an emoji or sometimes an image, the database explodes...
Owner

Have we checked what collation we are using for the database?

Have we checked what collation we are using for the database?
Author
Owner

OK, confirmed on charset/collation!

MariaDB [gitea]> SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' FROM information_schema.SCHEMATA;
+--------------------+---------+-------------------+
| database           | charset | collation         |
+--------------------+---------+-------------------+
| information_schema | utf8    | utf8_general_ci   |
| gitea              | latin1  | latin1_swedish_ci |
| mysql              | latin1  | latin1_swedish_ci |
| performance_schema | utf8    | utf8_general_ci   |
+--------------------+---------+-------------------+
4 rows in set (0.002 sec)
OK, confirmed on charset/collation! ``` MariaDB [gitea]> SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' FROM information_schema.SCHEMATA; +--------------------+---------+-------------------+ | database | charset | collation | +--------------------+---------+-------------------+ | information_schema | utf8 | utf8_general_ci | | gitea | latin1 | latin1_swedish_ci | | mysql | latin1 | latin1_swedish_ci | | performance_schema | utf8 | utf8_general_ci | +--------------------+---------+-------------------+ 4 rows in set (0.002 sec) ```
Author
Owner

Annndddd, it works! 🎉 🎉 🎉

Annndddd, it works! :tada: :tada: :tada:
Author
Owner

ALTER DATABASE gitea CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

`ALTER DATABASE gitea CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;`
Owner

Emojis still give me a 500 sadly :/ Also gitea crashes and doesn't trigger drone if you use an emoji in the first line of a commit message in a repo with a webhook. Regretfully reopening.

Emojis still give me a 500 sadly :/ Also gitea crashes and doesn't trigger drone if you use an emoji in the first line of a commit message in a repo with a webhook. Regretfully reopening.
3wordchant self-assigned this 2020-09-25 19:45:13 +00:00
decentral1se self-assigned this 2020-09-27 05:34:44 +00:00
Author
Owner

🕴️

🕴️
Author
Owner

8f78bd6862

I also had to run https://docs.gitea.io/en-us/command-line/#convert.

I will push a commit with an emoji now just to test again.

https://git.autonomic.zone/autonomic-cooperative/git.autonomic.zone/commit/8f78bd6862b82a54c21497f47d9df06abc4e6b21 I also had to run https://docs.gitea.io/en-us/command-line/#convert. I will push a commit with an emoji now just to test again.
Author
Owner
https://git.autonomic.zone/autonomic-cooperative/git.autonomic.zone/commit/943958846ada367b5b52844445ecc6b2699bb3de
This repo is archived. You cannot comment on issues.
No Label
No Milestone
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: autonomic-cooperative/git.autonomic.zone#13
No description provided.