You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a file with the UTF-8 Byte Order Mark (initial byte sequence EF BB BF) is opened, it is not preserved on save. While this generally isn't a major issue, it does mean any file changed with hx will be marked as changed by git, for example, even if you've made no character-wise changes.
Reproduction Steps
I tried this:
printf '\xEF\xBB\xBFtest\n' > bom-file
make sure file bom-file reports bom-file: Unicode text, UTF-8 (with BOM) text
hx bom-file and :wq immediately afterward
I expected this to happen: file bom-file reports bom-file: Unicode text, UTF-8 (with BOM) text once again, for the BOM is maintained
Instead, this happened: file bom-file reports bom-file: ASCII text, for the BOM is gone
Helix log
No response
Platform
Linux 6.1.14-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 26 00:31:11 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Terminal Emulator
kitty 0.26.5
Helix Version
helix 22.12
The text was updated successfully, but these errors were encountered:
Summary
When a file with the UTF-8 Byte Order Mark (initial byte sequence
EF BB BF
) is opened, it is not preserved on save. While this generally isn't a major issue, it does mean any file changed withhx
will be marked as changed bygit
, for example, even if you've made no character-wise changes.Reproduction Steps
I tried this:
printf '\xEF\xBB\xBFtest\n' > bom-file
file bom-file
reportsbom-file: Unicode text, UTF-8 (with BOM) text
hx bom-file
and:wq
immediately afterwardI expected this to happen:
file bom-file
reportsbom-file: Unicode text, UTF-8 (with BOM) text
once again, for the BOM is maintainedInstead, this happened:
file bom-file
reportsbom-file: ASCII text
, for the BOM is goneHelix log
No response
Platform
Linux 6.1.14-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 26 00:31:11 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Terminal Emulator
kitty 0.26.5
Helix Version
helix 22.12
The text was updated successfully, but these errors were encountered: