Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 208 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.
    • Денис СеливановД
      Денис Селиванов
      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
        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
          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
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors