Community
    • Login

    Is there a magic word combination for 100% accurate file auto-encoding?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 572 Views 1 Watching
    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.
    • Денис СеливановД Offline
      Денис Селиванов
      last edited by Денис Селиванов

      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.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @Денис Селиванов
        last edited by Alan Kilborn

        @Денис-Селиванов

        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.

        1 Reply Last reply Reply Quote 3
        • notdodgeballN Offline
          notdodgeball
          last edited by notdodgeball

          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.

          1 Reply Last reply Reply Quote 4

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors