Is there a magic word combination for 100% accurate file auto-encoding?
-
Is there a magic word combination that can be written in the comments of my source code so that when opening files, it will open files in the encoding I require 100% correctly? Something like this: “encoding=OEM-866” ?
It turns out that I use still outdated encoding OEM-866, and when opening source codes, about 10% of them open in the wrong encoding, I have to manually select the correct one, which is not very convenient. -
Auto-detection of encoding by Notepad++ is not an exact science.
If you always use OEM-866, then probably a script could set the encoding for you upon the opening of a file. -
You can create a macro and assign it a shortcut. If going for the script path, using PythonScript would be:
notepad.menuCommand( MENUCOMMAND.FORMAT_DOS_866 )
But then it will be executed for every opened file, unless you code some conditionals, that’s why I would prefer the macro.