2016-01-03 3:53 GMT+03:00 Random832 <[email protected]>: > mrosic (Vim Github Repository) <[email protected]> writes: > > "\a" is an alphabetic character [A-Za-z] Unfortunately that doesn't > > seem to include "ä" which makes Austrian sysadmins sad because they > > don't have syntax highlighting for Log files in January due to that > > error Note that for example echo -e "ä\na" | grep [a-z] will match > > both lines because unlike vim, grep considers "ä" to be a part of > > [a-z] which is exactly how it should be > > > That's a somewhat dangerous way of thinking. [a-z] is _not_ "all > lowercase characters" in any definition. For example, "ž" isn't in a-z > in most locales. In many locales, all but one of the basic 26 uppercase > letters is in a-z (typically A is not included, since it is before A; > occasionally this is reversed and Z is excluded instead). > > Certainly ä wouldn't be in a-z in Swedish. In this day and age it's > really not "safe" to use ranges as character classes in normal locales > (they're safe, as far as it goes, in the POSIX locale, but obviously > won't include non-ASCII characters). It is irritating that [[:alpha:]] > doesn't work with unicode characters, though. >
Help explicitly says that character classes like [[:alpha:]] work only for 8-bit characters. I am actually surprised with [[:lower:][:upper:]] matching ä (also Russian а and Greek α) in a UTF-8 locale because all three are not 8-bit characters at once in any locale. > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
