Kazunobu Kuriyama wrote:

> > But it seems strange that we need to restrict [:cntrl:] and [:graph:] to 
> > ASCII only.
> 
> Quite understandable.  But otherwise, we will have to either rely
> entirely on the is*() functions provided by the OS in use or define
> our own character classes independently of any of it.
> 
> The former case implies that the behavior of Vim scripts using
> [:class:] depends on the OS in use.   Surely, the latter case is
> expected to resolve the flaw of the former, but I'm not sure we can
> specify character classes in such a way that almost all users on
> various platforms are satisfied with them.
> 
> So, I think at the moment that the ASCII restriction is a reasonable
> compromise.  But I'm still quite open to other better solutions.

It's a difficult choice.  Either we say the regexp should be portable,
and we let Vim define exactly what those classes mean, or we say we must
follow how the current system considers characters to be classified.  I
wonder when the system knows better, perhaps when something in the
system configuration, e.g. the country or language, changes what
characters mean?

On the other hand, I would think that when Unicode is used, every system
should do the same thing, and to be independent of the state of the
system (outdated, bugs) we can define it inside Vim.  We largely already
do that with upper/lower case, double width, etc.

And then we have the option of adding two classes, once that has the
same meaning on all systems and one that follows the system.  Not sure
if that last one is actually useful for someone.

-- 
I'm writing a book.  I've got the page numbers done.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.

Raspunde prin e-mail lui