On Sun, 19 Oct 2003 11:26:58 +0200 (CEST) Robert Vazan <[EMAIL PROTECTED]> wrote:

RV> On Sat, 18 Oct 2003 15:54:05 -0700 Vadim Zeitlin
RV> <[EMAIL PROTECTED]> wrote:
RV> 
RV> > +            for( size_t word = each+1; alpha && word < colon; ++word )
RV> > +            {
RV> > +               // VZ: not sure that we want to use (locale-dependent)
RV> > +               //     wxIsalpha() here, please check
RV> > +               if ( !wxIsalpha(original[word]) )
RV> > +                  alpha = false;
RV> > +            }
RV> 
RV> It's simpler so why not.

 Because it could (and would) recognize letters about which you don't
necessarily think as alphabetic as ones. E.g. is "é" allowed here or not?
In general, when working with mail, addresses, ... you don't want to depend
on the current locale.

RV> I don't know of any way to use C locale temporarily, except maybe using
RV> C++ library.

 You can, of course, use setlocale("C") in pure C too (and restore locale
afterwards...) but if you know that you're really looking just for letters
and/or digits, you can also check it directly. Even if you worry about
EBCDIC support (although I wonder if you do...) this would still work there
as letters and digits are guaranteed to be in consecutive order in any
character set.

 Regards,
VZ



-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
Mahogany-Developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers

Reply via email to