• Login
Community
  • Login

Always work in OEM-US

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
oem-us default
5 Posts 3 Posters 856 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dave robinson
    last edited by Sep 12, 2020, 5:18 PM

    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?

    P 1 Reply Last reply Sep 14, 2020, 1:35 PM Reply Quote 0
    • P
      PeterJones @dave robinson
      last edited by Sep 14, 2020, 1:35 PM

      @dave-robinson ,

      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.

      A D 2 Replies Last reply Sep 14, 2020, 2:09 PM Reply Quote 1
      • A
        Alan Kilborn @PeterJones
        last edited by Sep 14, 2020, 2:09 PM

        @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.

        D 1 Reply Last reply Sep 17, 2020, 5:08 PM Reply Quote 1
        • D
          dave robinson @PeterJones
          last edited by Sep 17, 2020, 5:06 PM

          @PeterJones thanks, that’s an approach I hadn’t thought of.

          1 Reply Last reply Reply Quote 0
          • D
            dave robinson @Alan Kilborn
            last edited by Sep 17, 2020, 5:08 PM

            @Alan-Kilborn thanks

            1 Reply Last reply Reply Quote 0
            3 out of 5
            • First post
              3/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors