mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-09 04:25:18 -05:00
After migration russian letters are incorrectly encoded #2454
Closed
opened 2025-11-02 04:36:50 -06:00 by GiteaMirror
·
14 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
No Label
type/question
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#2454
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 @iddm on GitHub (Oct 25, 2018).
I have recently migrated from binary gitea to docker gitea. I made a dump and it imported into database inside docker also and now my issues look like this:
I also have
500 Internal Server Errorerror very often and when I look for the problem in the logs I see this:I have no idea what I have done wrong, could anyone help me please?
My
docker-compose.yml:@zeripath commented on GitHub (Oct 25, 2018):
I think your mariaDB has not been set-up to use utf-8, see https://github.com/docker-library/docs/issues/613
Basically you need
docker-compose.ymlto read:@iddm commented on GitHub (Oct 26, 2018):
I don't quite understand when I should set this
command: before importing database dump from old gitea or whenever I want and it must help immediately even after dump had been imported?@zeripath commented on GitHub (Oct 26, 2018):
I'm not a MariaDB expert, but I suspect you need it at least when you're importing the dump and I'd suspect when you're running the database.
@zeripath commented on GitHub (Oct 26, 2018):
Your data appears to be double utf8 encoded - if the above doesn't work, it might be worth taking a look at your dump to check if it's been double encoded there. If that's the case then there's likely a bug in the dumping. It should be possible to dedouble encode it with the recode command program.
@iddm commented on GitHub (Oct 26, 2018):
Thank you for your answer! But I have no idea how to reencode it back, gonna google. And how did you find this out, that the data was encoded twice?
@zeripath commented on GitHub (Oct 26, 2018):
The D bar characters in your screenshot told me that somewhere something was interpreting utf8 high bytes as separate characters rather than as part of an encoded single character.
There are two ways of that happening - the database is unaware that it has utf8 data so it prints out single bytes as characters which the receiving program thinks represents characters, so it reencodes them as utf8 characters - hence you see glyphs that would match the high bytes, or, data has been put into the database already in utf8 encoded bytes but which the db thinks are characters so it reencodes them as bytes.
Now it's difficult to actually see these things because most things nowadays do utf8 properly. You really need to check the bytestream at each point.
You should take a look at the wiki page for utf8 to learn about how it works. File encoding is a surprisingly difficult and fiddly topic in general and it's good to learn about it. Especially if your native language is not written plain old low-byte ASCII Latin.
@iddm commented on GitHub (Oct 27, 2018):
Okay, I have done what you asked me to do and I still have the same result. Could you recommend me anything else?
@iddm commented on GitHub (Oct 28, 2018):
Okay, this is still unanswered question. I have fixed it for myself so: I have just ignored the dump, installed fresh instance and migrated all of my 42 repositories from old instance, manually. Of course this is painful way but I was not able to find a good one unfortunately.
@zeripath commented on GitHub (Oct 28, 2018):
Ugh. That's obviously not an ideal situation. Sorry to hear that.
If you're still interested in finding out how to fix this, could you give me some more information?
@iddm commented on GitHub (Oct 28, 2018):
Sad day, the old VDS instance where was my old gitea has just been deleted, so I can't tell you exactly what version of mariadb was there, but I remember that I was looking for it when I migrated so they must be the same on new VDS. I don't recall any special settings, I have just installed it via something like
apt-get install mariadband that's all. I tried to create dump via gitea-bin commands as it was told in the documentation. I have restored everything correctly but just this encoding issue happened, everything else was fine afaik.And, perhaps, you forgot my problem: I migrated from
gitea-binon old vds instance togitea-dockeron new vds instance, I had not usedgitea-dockerbefore migration :)@zeripath commented on GitHub (Oct 28, 2018):
I hadn't forgotten about the change to docker, I was just checking whether dumping was working in your new setup. If not there's a problem with the gitea's dumping in general, rather than something specific to your setup.
Basically you've just been bitten by a backup and restore problem, so you should ensure that your backups work now and if not fix it before you need to restore again in future. This is one of the benefits of docker, spinning up duplicate instances should be relatively cheap.
@iddm commented on GitHub (Nov 7, 2018):
It is no longer an issue for me, I have done the work manually - by cloning all the repositories back into new instance with fresh gitea, without importing old dumps, so I probably can't provide any more information on this.
@lafriks commented on GitHub (Nov 7, 2018):
@vityafx can issue be closed then?
@iddm commented on GitHub (Nov 7, 2018):
Yes, but only because of that. :)