Skip to content

Conversation

mdonatas
Copy link
Contributor

@mdonatas mdonatas commented Oct 5, 2024

Fixes #11934

A bigger issue than originally mentioned in #11934 is that currently TextEditor provided/used by GitExtensions actually corrupts files 😬

Proposed changes

Screenshots

Before

Switching between UTF8 file without BOM and with BOM

no-bom-display-bug.mp4

After save using fileeditor (F4 from within commit dialog) ⚠️⚠️⚠️ notice corruption in a file without BOM

no-bom-save-corruption-bug.mp4

After

Both files even after saving them with fileeditor (F4 from within commit dialog) are recognized as UTF8

no-bom-save-corruption-fix.mp4

Test methodology

  • Manually, checking files visually and with Hex editor

Test environment(s)

  • Windows 11

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@mdonatas
Copy link
Contributor Author

mdonatas commented Oct 5, 2024

p.s. currently HEX view of binary files is broken when they are staged, that is this was already broken before this PR and this PR doesn't do anything to fix it. That fix will come later.

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, have not run

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have not run

@mstv mstv merged commit 28058d8 into gitextensions:master Oct 6, 2024
4 checks passed
@mdonatas mdonatas deleted the fileviewer-encoding-fix branch October 6, 2024 20:31
@pmiossec pmiossec mentioned this pull request Oct 18, 2024
@RussKie RussKie linked an issue Oct 29, 2024 that may be closed by this pull request
@RussKie RussKie added this to the 5.1 milestone Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken symbols Garbled characters in rebase branch interactively.
4 participants