Emoticon in pull request comment 500 error #5705

Closed
opened 2025-11-02 06:33:36 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @stu1811 on GitHub (Jul 7, 2020).

I've tried adding multiple different emoticons in pull request comments and approval and I always get a 500 error. This worked in the 1.11.5.. We skipped from 1.11.5 to 1.12.1. Did not try 1.12.0 or later 1.11.x versions.

  • Gitea version (or commit ref): 1.12.1 with go 1.14.4
  • Git version: 2.16.5
  • Operating system: Server running gitea service is RHEL 7.2. Client is CentOS 7.7.
  • Database (use [x]):
    • PostgreSQL
    • [X ] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • [X ] No
    • Not relevant
Originally created by @stu1811 on GitHub (Jul 7, 2020). I've tried adding multiple different emoticons in pull request comments and approval and I always get a 500 error. This worked in the 1.11.5.. We skipped from 1.11.5 to 1.12.1. Did not try 1.12.0 or later 1.11.x versions. - Gitea version (or commit ref): 1.12.1 with go 1.14.4 - Git version: 2.16.5 - Operating system: Server running gitea service is RHEL 7.2. Client is CentOS 7.7. - Database (use `[x]`): - [ ] PostgreSQL - [X ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X ] No - [ ] Not relevant
GiteaMirror added the type/question label 2025-11-02 06:33:36 -06:00
Author
Owner

@zeripath commented on GitHub (Jul 7, 2020):

This is likely to be yet another MySQL issue with character encodings.

On MySQL we require utf8mb4 as the character encoding. There is a command called gitea convert that should set this for you.

@zeripath commented on GitHub (Jul 7, 2020): This is likely to be yet another MySQL issue with character encodings. On MySQL we require utf8mb4 as the character encoding. There is a command called `gitea convert` that should set this for you.
Author
Owner

@lunny commented on GitHub (Jul 7, 2020):

@zeripath But he said 1.11.5 is work

@lunny commented on GitHub (Jul 7, 2020): @zeripath But he said 1.11.5 is work
Author
Owner

@stu1811 commented on GitHub (Jul 7, 2020):

gitea convert -c /etc/gitea/app.ini
Converted successfully, please confirm your database's character set is now utf8mb4
MySQL>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
MySQL              | latin1   | latin1_swedish_ci
giteadb           |utf8mb4      |  utf8mb4_general_ci

Emoticons still do not work

@stu1811 commented on GitHub (Jul 7, 2020): ``` gitea convert -c /etc/gitea/app.ini Converted successfully, please confirm your database's character set is now utf8mb4 ``` ``` MySQL>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 MySQL | latin1 | latin1_swedish_ci giteadb |utf8mb4 | utf8mb4_general_ci ``` Emoticons still do not work
Author
Owner

@lunny commented on GitHub (Jul 7, 2020):

You should also change your app.ini CHARSET item on DATABASE section.

@lunny commented on GitHub (Jul 7, 2020): You should also change your `app.ini` CHARSET item on DATABASE section.
Author
Owner

@stu1811 commented on GitHub (Jul 7, 2020):

Setting CHARSET in DATABASE to utf8mb4 fixed it. Was utf8 previously. Thanks!

@stu1811 commented on GitHub (Jul 7, 2020): Setting CHARSET in DATABASE to utf8mb4 fixed it. Was utf8 previously. Thanks!
Author
Owner

@apiraino commented on GitHub (Jul 20, 2020):

The fix works for us too, we have gitea installed using a docker container on an existing DB and didnt pay attention to the documentation :-)

https://docs.gitea.io/en-us/database-prep/#mysql

@apiraino commented on GitHub (Jul 20, 2020): The fix works for us too, we have gitea installed using a docker container on an existing DB and didnt pay attention to the documentation :-) https://docs.gitea.io/en-us/database-prep/#mysql
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5705