Community
    • Login

    Set default character set for opening existing files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 11.7k 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.
    • Frimen YellowF
      Frimen Yellow
      last edited by

      Hi!
      When I open txt files in win-1251 (not utf-8) encoding very often some text is unreadable because of wrong chosen character set. Some files open with Macintosh character set, other with win-1255. This is example, how it looks: http://tinypic.com/r/27zubo/9, text is unreadable.
      Every time I have to manual choose correct character set, after that text looks fine: http://tinypic.com/r/xne0z6/9.
      Please advice me how to set up default character set for opened (existing) files with non utf8 encoding? There is such option for new files, it doesn’t work for existing files.

      1 Reply Last reply Reply Quote 1
      • guy038G
        guy038
        last edited by guy038

        Hello, @friemen-yellow,

        You, probably, have the encoding auto-detection enabled. I advice you to disable that feature ( Settings > Preferences… > MISC > Autodetect character encoding ). So, on opening a Cyrillic encoded file, N++ should use, the standard ANSI encoding…

        And, as your default character set, for NON-Unicode files, is, certainly, Windows-1251, your should see, immediately, the right Cyrillic characters, that you expect to :-))

        To verify which is your default encoding configuration, for Non-Unicode files, just open the ASCII Insertion Panel ( Edit > Character Panel ). For Windows-1251, the uppercase Cyrillic characters lay, between code values 192 and 223 and the lowercase Cyrillic characters are between code values 224 and 255.

        And if you change the default ANSI encoding for the Windows-1251 encoding ( Encoding > Character sets > Cyrillic > Windows-1251 ), the list, in the ASCII Insertion panel is updated but shoud remain unchanged !

        You may also, for quick change to the Windows-1251 encoding, use a shortcut. Choose the menu option Settings > Shortcut Mapper… > Main Menu > Windows-1251 ( Line 213 ). I, personally, chose the Crtl + Alt+ E shortcut. Unfortunately, there’s a small bug, as the shortcut description overwrites the encoding zone, on the right part of the status bar ! So, the new current encoding is, generally, impossible to distinguish :-((

        Best Regards,

        guy038

        PS :

        In addition, if you’re using the option Settings > Preferences > Backup > Remember current session for next launch, the Windows-1251 encoding of your opened Cyillic files should be preserved, from one session to the next one, as it is clearly coded in the Session.xml configuration file ( encoding=“1251” ) if, of course, you did not close these files, before closing N++

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