Bruno Haible <[EMAIL PROTECTED]> writes: > 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).
(b) sounds error prone. I think one could come up with examples that will work in the C locale but not work in some other locale, because the wrong language (out of a hypothetical set) gets identified out of Bison's builtin set. (a) sounds safer. With (a), if someone comes up with a computer language with a Turkish-language extension, I suppose they'll just have to match its name exactly. That's good enough. The only reason for the case-insensitive comparison here is support for Windows-like file names, right? So the issue is not worth our worrying about (except perhaps as a warning that we should avoid case-insensitive comparison whenever we can :-).
