Newly installed instance could use incorrect "utf8" charset for MySQL #11061

Closed
opened 2025-11-02 09:26:25 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @wxiaoguang on GitHub (Jun 20, 2023).

A default install could produce such app.ini:

APP_NAME=Gitea: Git with a cup of tea
RUN_USER=xiaoguang
RUN_MODE=prod

[database]
DB_TYPE=mysql
HOST=127.0.0.1:3306
NAME=gitea
USER=gitea
PASSWD=gitea
SCHEMA=
SSL_MODE=disable

CHARSET=utf8     !!!!!!!!!!!! wrong here

PATH=/Users/xiaoguang/work/gitea/data/gitea.db
LOG_SQL=false

"utf8mb4" is required for MySQL to work with emoji.

Originally created by @wxiaoguang on GitHub (Jun 20, 2023). A default install could produce such app.ini: ``` APP_NAME=Gitea: Git with a cup of tea RUN_USER=xiaoguang RUN_MODE=prod [database] DB_TYPE=mysql HOST=127.0.0.1:3306 NAME=gitea USER=gitea PASSWD=gitea SCHEMA= SSL_MODE=disable CHARSET=utf8 !!!!!!!!!!!! wrong here PATH=/Users/xiaoguang/work/gitea/data/gitea.db LOG_SQL=false ``` "utf8mb4" is required for MySQL to work with emoji.
GiteaMirror added the type/bug label 2025-11-02 09:26:25 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jun 22, 2023):

Keep it open for 1.20 .... it's a serious problem now ....

@wxiaoguang commented on GitHub (Jun 22, 2023): Keep it open for 1.20 .... it's a serious problem now ....
Author
Owner

@lunny commented on GitHub (Jun 22, 2023):

Could you backport #25413 ?

@lunny commented on GitHub (Jun 22, 2023): Could you backport #25413 ?
Author
Owner

@wxiaoguang commented on GitHub (Jun 22, 2023):

There is a separate PR #25432 for 1.20, while I do not understand why there was objection for backporting #25413 or what's the difference between them.

@wxiaoguang commented on GitHub (Jun 22, 2023): There is a separate PR #25432 for 1.20, while I do not understand why there was objection for backporting #25413 or what's the difference between them.
Author
Owner

@lunny commented on GitHub (Jun 22, 2023):

There is a separate PR #25432 for 1.20, while I do not understand why there was objection for backporting #25413 or what's the difference between them.

Now I can understand backporting #25413 will not break too much.

@lunny commented on GitHub (Jun 22, 2023): > There is a separate PR #25432 for 1.20, while I do not understand why there was objection for backporting #25413 or what's the difference between them. Now I can understand backporting #25413 will not break too much.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11061