chcg / NPP_HexEdit

Notepad++ Plugin Hexedit
821 stars 156 forks source link

HexEdit misinterprets file and saves incorrectly #76

Open Gordo2022 opened 1 year ago

Gordo2022 commented 1 year ago

Hi,

I have a problem with editing a specific file with N++ in the HexEdit view, where the file content that I see in the Hex preview is not what actually gets saved. Please refer to this link: (https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12647#issue-1498456050)

To recreate the bug:

1) The original file made_with_hxd.txt looks like this: image

2) open the file you created and switch to the HexEditor view (leave at OEM866), it now looks like this: image

3) correct the bytes in the file that appear to have changed from the original image

4) Save the file and close it.

5) Now if you re-open the file in N++ or Hxd (HxD shown below), it looks like this (the file has been altered): image

Thank you!