mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-12 10:39:38 -05:00
Emojis are converted to question-marks in repository description #1151
Closed
opened 2025-11-02 03:50:11 -06:00 by GiteaMirror
·
18 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.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-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#1151
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jonasfranz on GitHub (Oct 15, 2017).
f3833b7[x]):Description
It result into the following: "????App for iOS" if you want to add emojis to your repository description like "📱App for iOS".
Emojis in the description could be useful like seen at the ownCloud Github Project (https://github.com/owncloud).
This might be caused by the used MySQL database.
@lunny commented on GitHub (Dec 5, 2017):
So maybe mysql database should be
utf8mb4?@kolaente commented on GitHub (Mar 24, 2018):
I had a similar issue, but in my case the description was completly deleted when I added an emoji to the repo description (
v1.4-rc-2). Seems to work fine on master with sqlite though.@lunny commented on GitHub (Dec 9, 2018):
This should be fixed by https://github.com/go-gitea/gitea/pull/5168, please feel free to reopen it.@lunny commented on GitHub (Dec 9, 2018):
If you input
:smile:that right for repo description, but if you paste from your clipboard, that will fail.@immanuelfodor commented on GitHub (Dec 31, 2018):
I can confirm this on v1.6.2, any emoji copypasted from e.g. https://emojipedia.org becomes
????. Only the manually typed:emojicode:works fine. This issue is also present at eg. org descriptions, copypasted emojis become question marks. Screenshot from an issue comment:@lunny commented on GitHub (Jan 3, 2019):
So should we parse the copypasted emojis to :emojicode: before save it?
@immanuelfodor commented on GitHub (Jan 3, 2019):
Great idea, it should work without
utf8mb4then (simpleutf8databases/tables).@stale[bot] commented on GitHub (Mar 4, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@immanuelfodor commented on GitHub (Mar 4, 2019):
Any new info on somebody planning to implement the suggested conversion that could solve the original issue? :)
@helmut72 commented on GitHub (Mar 10, 2019):
Or just add MySQL utf8mb4 support.
@immanuelfodor commented on GitHub (May 24, 2019):
Wow, thank you, @lunny ! Will there be a migration guide for us until the next release how to upgrade an existing database? Or this depends on the community if someone publishes such? I think I did such for a Nextcloud install once following these steps: https://docs.nextcloud.com/server/16/admin_manual/configuration_database/mysql_4byte_support.html Should these steps work in theory for Gitea as well? (With replacing the DB name, of course)
@lunny commented on GitHub (May 24, 2019):
@immanuelfodor convert a utf8 database to utf8mb4 database is possbile. And I found an article about how to convert utf8 to utf8mb4, see https://mathiasbynens.be/notes/mysql-utf8mb4
@immanuelfodor commented on GitHub (Jul 31, 2019):
The new PRs #7144 #6992 took care of the conversion with the new
gitea convertcommand successfully but I still get four question marks in comments when commenting with an emoji. All my tables are Barracuda, utf8mb4, row format dynamic, etc etc. Gitea was newly built, restarted, new login session.@immanuelfodor commented on GitHub (Jul 31, 2019):
I'm not sure if this is a DB issue because the CLI shows ???? as if it was saved to the DB this way.
@lunny commented on GitHub (Aug 1, 2019):
@immanuelfodor could you paste the content here so that I can test it locally.
@immanuelfodor commented on GitHub (Aug 1, 2019):
Just two grinning faces, first line is with
:grinning:, second is the same face copied from emojipedia (copy button): https://emojipedia.org/grinning-face/Funny thing is that in the meantime, I received an email from Gitea, and it contains the emoji fine on the second line. Maybe the email is sent before the multibyte character is converted?
Another idea is the DB connection, in PHP, you would need to run
SET NAMES utf8mb4before anything else, I don't know if it is true for Go as well or if you do it in Gitea: https://stackoverflow.com/questions/16893035/using-utf8mb4-with-php-and-mysqlIn the same MariaDB server, a Nextcloud and a TT-RSS database is stored, too, and both handle emojis fine with utf8mb4.
@lunny commented on GitHub (Aug 1, 2019):
@immanuelfodor You should change
charsetin app.ini toutf8mb4. Go to https://docs.gitea.io/en-us/config-cheat-sheet/ and search CHARSET . I think your problem maybe because you haven't set that.@immanuelfodor commented on GitHub (Aug 1, 2019):
Aaand YES! I looked through my app.ini before, but I did not have the charset option there, it must be newer than my file. Added it, restarted Gitea, new comment, and it works! Thank you very much.