Thanks for your research!

I only meant, but didn't explain very well (at all) that it is no
longer good enough to assume that the whole world speaks American
English. While there is a good case for English-based programming
languages, programming is about end-users. They don't know and don't
want to know about limitations of 8 bits or ASCII's definition of the
alphabet, nor do clients or project managers. They just want to be
able to read things in their own language. We're getting there slowly.

I was actually surprised to find that English isn't the most spoken
language. But my intended point was it is only one of three major
languages. I am British and I live and work in Spain, producing
multilingual websites in Catalan, Spanish, English and, occasionally,
German and French.

On 2 Juny, 16:13, Joel Perras <[EMAIL PROTECTED]> wrote:
> Ok, I'm a big enough man to admit when I'm wrong.
> After reading the POSIX specification for alphanumeric characters and
> realizing that it accomodates for different character set collations,
> I concede that you are correct in stating that 'alphanumeric' should
> apply to accented characters.
>
> However, the fact that English is not the most spoken language in the
> world is a vacuous argument; by your reasoning, programming languages
> should be written and interpreted in Chinese and Spanish instead of
> English.  I have yet to find a compiled or interpreted Chinese
> programming language, and I don't think they exist AFAIK.
> English is ubiquitous in the scientific (and software) community, and
> there's not much we can do to change this (my first language is
> French), nor would I want to.
>
> Anyways, here's what I've found:
>
> After doing a bit of research, I believe the solution to your problem
> is this regular expression:  /[^[:alnum:]]/u
>
> Ex:
>
> //1st element will pass, 2nd ?, 3rd will fail
> $data = array("asdf1", "çñasd45", "@#%asd23");
>
> foreach ($data as $str):
>         if (!preg_match("/[^[:alnum:]]/u", $str)) echo $str . " is
> valid alphanumeric. \n\n"';
>         else echo $str . " IS NOT VALID\n\n";
> endforeach;
>
> print_r($data);
>
> //Output:
>
> asdf1 is valid alphanumeric.
>
> çñasd45 is valid alphanumeric.
>
> @[EMAIL PROTECTED] IS NOT VALID
>
> Array
> (
>     [0] => asdf1
>     [1] => çñasd45
>     [2] => @#%asd23
> )
>
> On Jun 2, 4:56 am, leo <[EMAIL PROTECTED]> wrote:
>
> > I did click the link and I followed the references. It would seem that
> > a letter like ñ or ç is a letter embellished with a diacritic.
> > Therefore the letter is valid and the diacritic should be ignored. Ñ
> > is alpha.
>
> > From the same source, Spanish is spoken as a first language by between
> > 322 and 400 million people. English by 375 million. The English
> > speaking population of the USA is 215 million. Furthermore, Spanish is
> > a Latin language and the ASCII definition is based on the Latin
> > alphabet.
>
> > > >http://en.wikipedia.org/wiki/Alphanumeric
>
> > Things have moved on from the World as defined by IBM et al
> > (thankfully), but unfortunately the World has now become defined, in
> > the eyes of many, by Wikipaedia. Wikipaedia is a useful tool used in
> > conjunction with others, but dangerous on its own.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to