Community
    • Login

    Always work in OEM-US

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    oem-us default
    5 Posts 3 Posters 882 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.
    • dave robinsonD
      dave robinson
      last edited by

      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?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @dave robinson
        last edited by

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

        Alan KilbornA dave robinsonD 2 Replies Last reply Reply Quote 1
        • Alan KilbornA
          Alan Kilborn @PeterJones
          last edited by

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

          dave robinsonD 1 Reply Last reply Reply Quote 1
          • dave robinsonD
            dave robinson @PeterJones
            last edited by

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

            1 Reply Last reply Reply Quote 0
            • dave robinsonD
              dave robinson @Alan Kilborn
              last edited by

              @Alan-Kilborn thanks

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