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
\x80to\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 :
64characters selectedIn 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
-
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