Description
Description
Upgraded to version 1.21.0 I get an error accessing the repository page.
SyncRepoBranches, Error 1366 (HY000): Incorrect string value: '\xBD\xE2\xBE\xF673...' for column 'commit_message' at row 1
I converted all database tables to utf8mb4 via gitea cli command doctor convent. but the problem remains. I have checked the database and configuration files to make sure they are OK.
2023/11/22 15:05:34 ...repository/branch.go:25:SyncRepoBranches() [D] SyncRepoBranches: in Repo[84:ASM-Server/asm_03_regist]
2023/11/22 15:05:34 ...repository/branch.go:44:SyncRepoBranchesWithRepo() [T] SyncRepoBranches[.....]
2023/11/22 15:05:34 ...ules/context/repo.go:681:RepoAssignment() [E] SyncRepoBranches: Error 1366 (HY000): Incorrect string value: '\xBD\xE2\xBE\xF673...' for column 'commit_message' at row 1
Looking through the logs I found that writing the branch information to the database fails because the commit message contains garbled code. I downloaded the repository to check the information of the last commit message, and found that the last commit message of one branch was garbled, which was the Chinese content committed by a colleague on a Chinese-encoded linux with GBK encoding, and it was garbled when I checked it with the git gui tool.
Maybe replacing or removing non-utf8 character content would be a good idea.
Gitea Version
1.21.0
Git Version
2.38.1
Operating System
Centos 7.9
How are you running Gitea?
Running the official release version through systemd
Database
MySQL/MariaDB