Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing diff when changing file encoding #16329

Closed
jpraet opened this issue Jul 2, 2021 · 0 comments · Fixed by #16330
Closed

Confusing diff when changing file encoding #16329

jpraet opened this issue Jul 2, 2021 · 0 comments · Fixed by #16330
Labels

Comments

@jpraet
Copy link
Member

jpraet commented Jul 2, 2021

Description

I have commits that change the encoding of files from Windows Cp1252 encoding to UTF-8.

In Gitea, the diff makes it look like the special characters get converted incorrectly.

https://try.gitea.io/jpraet/encoding/commit/7d1a5559f40bb2520c42d08c9508c2e5d82d98d5
afbeelding

When viewing the new file, it is displayed correctly as UTF-8 though.

https://try.gitea.io/jpraet/encoding/src/commit/7d1a5559f40bb2520c42d08c9508c2e5d82d98d5/test.txt
afbeelding

On GitHub, it looks like this: jpraet/encoding@7d1a555

afbeelding

Git diff output:
afbeelding

@lunny lunny added the type/bug label Jul 3, 2021
6543 added a commit to jpraet/gitea that referenced this issue Jul 12, 2021
6543 added a commit to jpraet/gitea that referenced this issue Jul 12, 2021
6543 added a commit to jpraet/gitea that referenced this issue Jul 13, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants