5000 commenting on a line with accented chars #4911

Closed
opened 2025-11-02 06:06:57 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @rlogiacco on GitHub (Feb 21, 2020).

  • Gitea version (or commit ref): 1.11.1
  • Git version:
  • Operating system: linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Commenting on a pull request on a line containing accented characters produces a 500 error with the following log:

2020/02/21 10:48:46 .../repo/pull_review.go:48:CreateCodeComment() [E] CreateCodeComment: Error 1366: Incorrect string value: '\xE8 vali...' for column 'patch' at row 1

The line this comment was pointing at is

			throw new Exception("ATTENZIONE: La Sessione HTTP non è valida");
Originally created by @rlogiacco on GitHub (Feb 21, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): *1.11.1* - Git version: - Operating system: *linux* - 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 - Log gist: ## Description Commenting on a pull request on a line containing accented characters produces a 500 error with the following log: ``` 2020/02/21 10:48:46 .../repo/pull_review.go:48:CreateCodeComment() [E] CreateCodeComment: Error 1366: Incorrect string value: '\xE8 vali...' for column 'patch' at row 1 ``` The line this comment was pointing at is ``` throw new Exception("ATTENZIONE: La Sessione HTTP non è valida"); ```
GiteaMirror added the issue/duplicate label 2025-11-02 06:06:57 -06:00
Author
Owner

@lunny commented on GitHub (Feb 21, 2020):

Maybe you should use utf8mb4 charset on your app.ini

@lunny commented on GitHub (Feb 21, 2020): Maybe you should use utf8mb4 charset on your app.ini
Author
Owner

@guillep2k commented on GitHub (Feb 21, 2020):

This happens when the file itself is not using utf-8 (e.g. ISO-8859-1).
This is a duplicate of #7270.

@guillep2k commented on GitHub (Feb 21, 2020): This happens when the file itself is not using utf-8 (e.g. ISO-8859-1). This is a duplicate of #7270.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4911