selection length issue with char §



  • 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?



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



  • 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


Log in to reply