bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strcasecmp


From: Bruno Haible
Subject: Re: strcasecmp
Date: Wed, 14 Feb 2007 17:26:44 +0100
User-agent: KMail/1.9.1

Paolo Bonzini wrote:
> I'm not sure how Turkish people would do lowercase translation 
> of English words.  In other words, I'm not sure if they'd write the 
> hypothetical language Iris as İRİS or ırıs.

This is one question to ask. The other consideration is:

If a script contains an invocation "bison --language=Iris" or
"bison --language=iris", then the script will work in all non-Turkish locales.
Therefore it should also work in Turkish locales; otherwise it's viewed as
a bug.

This consideration points to using
   (a)  c_strcasecmp (a, b) or
   (b)  c_strcasecmp (a, b) || mbscasecmp (a, b).

If your Turkish friend says he would write "ırıs", then it points to (b).
If not, i.e. if such a word is not considered like a Turkish word, it points
to (a).

Btw, mbscasecmp not strcasecmp - because strcasecmp cannot work in Turkish
UTF-8 locales.

> I don't think it's exact to say, "c-strcasecmp works fine if at least 
> one argument is ASCII _and_ the locale is not a Turkish locale".

What I said to Paul in private mail was that "strcasecmp works fine if at
least one argument is ASCII _and_ the locale is not a Turkish locale".

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]