charset issue in diff views #5241

Open
opened 2025-11-02 06:18:56 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @JLuc on GitHub (Apr 16, 2020).

  • Gitea version (or commit ref): Gitea Version: 1.11.4

Description

  • using gitea online editor (_edit in url), I edited a file so as to fix some glyphs charset issues (replace ? with ).

  • i saved the edited file using "Save" gitea UI button.

  • The viewed diff displays unwanted charset changes, both where i edited but also on other places with accentuated glyphs in comments notably : 503ca152f1
    Capture d’écran de 2020-04-16 08-33-29

  • BUT the file in the repo is correct (see download edited file )
    Capture d’écran de 2020-04-16 08-35-45

Issue is

  • file view doesnt display any charset visible issue
  • diff view should not display these awkward glyphs issues
  • OR (at least) a warning should be issued at the right moment (or in the right place : in the diff view), when some charset related event happens (or when something special related to charset has happened) that causes this display issue
Originally created by @JLuc on GitHub (Apr 16, 2020). - Gitea version (or commit ref): Gitea Version: 1.11.4 ## Description - using gitea online editor (`_edit` in url), I edited a file so as to fix some glyphs charset issues (replace `?` with `’`). - i saved the edited file using "Save" gitea UI button. - The viewed diff displays unwanted charset changes, both where i edited but also on other places with accentuated glyphs in comments notably : https://git.spip.net/spip-contrib-extensions/facteur/commit/503ca152f1b3b55ffc576a1efba084602aa8c36d ![Capture d’écran de 2020-04-16 08-33-29](https://user-images.githubusercontent.com/443278/79422348-0228db80-7fbd-11ea-9df0-86799fa88fdf.png) - BUT the file in the repo is correct (see [download edited file](https://git.spip.net/spip-contrib-extensions/facteur/src/commit/503ca152f1b3b55ffc576a1efba084602aa8c36d/inc/Facteur/FacteurMail.php) ) ![Capture d’écran de 2020-04-16 08-35-45](https://user-images.githubusercontent.com/443278/79422519-5207a280-7fbd-11ea-945d-51caa9109ee9.png) ### Issue is - file view doesnt display any charset visible issue - diff view should not display these awkward glyphs issues - OR (at least) a warning should be issued at the right moment (or in the right place : in the diff view), when some charset related event happens (or when something special related to charset has happened) that causes this display issue
GiteaMirror added the issue/confirmed label 2025-11-02 06:18:56 -06:00
Author
Owner

@zeripath commented on GitHub (Apr 16, 2020):

File encoding is a nightmare.

You've clearly uploaded a non-utf8 file to your git repository.

What was the original encoding? What's it been changed to? I did try quite hard to not cause changes of encoding but I suspect I failed here.

In general Git very much prefers files to be in utf8. Things are much simpler if that is the case.

@zeripath commented on GitHub (Apr 16, 2020): File encoding is a nightmare. You've clearly uploaded a non-utf8 file to your git repository. What was the original encoding? What's it been changed to? I did try quite hard to not cause changes of encoding but I suspect I failed here. In general Git very much prefers files to be in utf8. Things are much simpler if that is the case.
Author
Owner

@stale[bot] commented on GitHub (Jun 15, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Jun 15, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5241