Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    selection length issue with char §

    Help wanted · · · – – – · · ·
    2
    3
    876
    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.
    • smth76
      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
      • smth76
        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
        • guy038
          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
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors