Community
    • Login

    selection length issue with char §

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 1.4k 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.
    • smth76S Offline
      smth76
      last edited by

      i wonder, why when selecting text (like “1111§§§§2222”) within notpad++ says “Sel: 8” instead of “Sel: 12”.
      the § char is not counted … this is irritating. replacing § with any other char the selection length is correct.

      placing the cursor at the end of text then np++ (correctly) is displaying “Col: 13” for all used chars.

      any idea?

      1 Reply Last reply Reply Quote 0
      • smth76S Offline
        smth76
        last edited by

        little update: it’s only happening on ANSI, when doing this on UTF-8 it’s all fine …

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

          Hello @smth76 and All,

          Yeah, in an ANSI encoded file, any character, with Unicode value, between \x80 to \xBF, is NOT taken in account :-(( It’s a very old bug. In an encoded ANSI file, you can search these characters with the regex [\x80-\xbF]

          On my laptop, as I’m French, the NON Unicode encoding used, in ANSI, is the Windows-1252 encoding

          Luckily, nowadays, it’s better to use any Unicode encoding, that is to say, any other encoding but ANSI ;-)) In that case, the selection of all these characters do give the expected result : 64 characters selected

          In an Unicode encoded file, these characters may be found with, either, the regexes :

          • [\x80-\xbF]

          • [\x{80}-\x{bF}]

          • [\x{0080}-\x{00bF}]

          Best Regards,

          guy038

          1 Reply Last reply Reply Quote 0

          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