Identical files and different display of some characters ..



  • Comparing two short headers containing, each, exactly these 16 bytes (hex format): 01 00 01 00 44 AC 00 00 88 01 00 02 00 10 00, i get a different characters view for bytes 6 and 9. My version of Notepad ++ is 7.7.1, but I’ve tried older versions with the same result. Is there any setting to configure, which escapes me? It would be useful to quickly compare the differences on parts of binary headers, especially when searching for frame errors on protocols. Thanx



  • @Federico-Lomazzi said:

    Comparing two short headers containing, each, exactly these 16 bytes (hex format): 01 00 01 00 44 AC 00 00 88 01 00 02 00 10 00

    That’s 15 bytes shown, not 16.

    As a text editor, Notepad++ will try to interpret those as text. It’s not ASCII, since some are over hex 80 (including the two bytes you reference, assuming you are counting bytes starting at 1). It might be one of the old 8-bit encodings. Or it might be a multi-byte encoding: either something like UCS-2-LE/BE (which is what Windows uses internally for multibyte-character strings), or it might be a unicode encoding such as UTF-8.

    Sometimes Notepad++ guesses wrong for what encoding is meant (it’s not always programmatically obvious what encoding you’re using); if it’s guessing wrong for you, I suggest Settings > Preferences > Misc and disabling ☐ Autodetect character encoding, then manually choosing the right encoding.

    i get a different characters view for bytes 6 and 9

    Since bytes 6 and 9 are AC and 88, I’m not sure why you think they should be the same, whether they’re really just those single-bytes, or whether they are multi-byte characters. (Or maybe by “same”, you mean they aren’t the same as what you think they should be… in which case, see the guesses-wrong-encoding, above.)


Log in to reply