How does NP++ determine the character set?

  • I am in the midst of writing a system that reads in a binary file, allows the user to change a very limited set of values in known locations, and then writes it back out again. This system is mostly working, except for strings.

    Whenever I have a problem with strings, the first thing I do is open the file, even binary, in NP++. This immediately revealed… something. I know that there is one of these strings near the top of the file and it reads “THINGY”, so I searched for it and immediately found it.

    I then opened the original file, the template so to speak, and that string was not there. In fact, all the characters in the file were in some other encoding. So I suspect what has happened is that there is some sort of encoding indicator somewhere in the file that I am failing to set properly.

    So, finally, the question: how does NP++ determine what character set encoding to use when you open a file?

Log in to reply