Always work in OEM-US
-
I want to always open source code files as OEM-US as otherwise line-draw characters get mashed up.
I see there is supposed to be a python script out there that will achieve this. Anybody got it? -
I believe that
notepad.menuCommand(MENUCOMMAND.FORMAT_DOS_437)
is what you want (DOS CodePage 437 is equivalent to OEM-US). You could bind a script with that (or just record a macro of you selecting Encoding > Character Sets > Western European > OEM-US) and assign to a keystroke of your choice. Or you could write a more complicated PythonScript script that will associate a function with the “open file” notification. -
@PeterJones said in Always work in OEM-US:
…that will associate a function with the “open file” notification.
One thing I’ve noticed is that if a session (including the “remembered” session) is restored when N++ is starting up, “open file” notifications are not received (for files in the session) by code that is installed via Pythonscript’s startup.py . However, “buffer activated” notifications for these files are received.
Having not tried something like what the OP desires in this scenario, I’m not sure it comes into play, but I thought I’d mention it.
-
@PeterJones thanks, that’s an approach I hadn’t thought of.
-
@Alan-Kilborn thanks