chcg / NPP_HexEdit

Notepad++ Plugin Hexedit
829 stars 156 forks source link

A Bug Report: Display Error? #8

Open davidanger opened 5 years ago

davidanger commented 5 years ago

I'm using Th.HEX file to Tb.BIN file. Found this maybe a Bug. Th.HEX: :05000000744C7867F666 :00000001FF Tb.BIN(Should Be): 00000000 74 4C C7 78 67 F6 Tb.BIN(Display): 00000000 74 4C C7 78 67 C3 B6

So If you change or make a bin file in HEX mode, by end of F6. Than you save and reopen this file, you'll see display is C3 B6.

Thanks.

davidanger commented 5 years ago

N++: 7.6 64bit Nov 13 2018 Plug: 0.9.5.19

chcg commented 5 years ago

Maybe a issue with the automatic detection of the encoding. Which one did you use for creating/modifying the file and which one is shown on reload? You could try to disable autodetect char encoding in preferences:

grafik

TransparentLC commented 5 years ago

The same problem occured when I opened a file with content F6 00 09 00 00 00 00 00 00 00, the F6 was "replaced" with C3 B6 and the last 4 bytes disappeared. It still occurs after I diasbled autodetect encoding. I created this file by using fwrite() in a C program, the encoding shown in NPP was UCS-2 Little Endian. I'm using NPP 7.5.9 64-bit and the plugin's version is 0.9.5.19.

chcg commented 4 years ago

From https://github.com/notepad-plus-plus/notepad-plus-plus/issues/7818

Problem

1. I created a binary file use this C code

    uint32_t d = 0xf1f2f3f4;
    FILE* f = fopen("t.bin","wb");    
    fwrite(&d,1,4,f);
    fclose(f);

2. then open it with Notepad++

3. The status bar does not display correctly

4. click plugin menu of HEX-Editor -> View in Hex, it's also incorrect,

1

Debug Information

Notepad++ v7.8.2 (32-bit) Build time : Dec 4 2019 - 01:36:59 Path : C:\Program Files (x86)\Notepad++\notepad++.exe Admin mode : OFF Local Conf mode : OFF OS Name : Windows 10 Home China (64-bit) OS Version : 1903 OS Build : 18362.535 Plugins : DSpellCheck.dll HexEditor.dll mimeTools.dll NppConverter.dll NppExport.dll NppMarkdownPanel.dll

HEX-Editor version : 0.9.5