Out of curiosity I did browse the code to see how “find in files” works in Notepad++. As far as I understood:
NPP scans the directory tree and creates a list of all files that match the Filters. For each file in the list NPP will:– Load the ifile into NPP in “hidden” state. During that load NPP will guess the file’s unicode encoding. NPP may very well guess wrong.
– Search hidden file within NPP for required pattern.
– Add matching locations to ‘finder’.
– Close hidden file.
I did not go into the actual comparison but pattern should be matched to file using some common encoding. Either pattern is re-encoded into the guessed file encoding or during the scan each symbol is translated into its Unicode point of U+### and compared.
The bottom line is that if the initial encoding guess was wrong NPP will fail to find matches.
I use NPP mostly for UTF-8/ASCII files and sometimes for UTF-16 (Microsofts default). NPP auto detect these well.
I will not be surprised if rarer (country specific) encodings are often misdetected.
In any case this “find in files” scheme is very slow and I hardly use it. I prefer ‘greping’ externally.
It would be nice to implement for code developers a much more efficient UTF-8 only find in files that does not bother to load each file into Notepad++. Possibly in a plugin.