Okay, I just made a little program -- which I guess I have no way to
attach here... I'll paste it in:
#include <locale.h>
#include <string.h>
#include <stdio.h>
#define COMPARE(a, b) printf("strcasecmp of %s and %s is %d\n", (a), (b), strcas
ecmp((a), (b)));
void loc(const char *l)
{
printf("locale set to %s\n", setlocale(LC_CTYPE, l));
COMPARE("i", "I");
COMPARE("i", "\u0130");
COMPARE("i", "\u0131");
COMPARE("I", "\u0131");
COMPARE("u", "U");
COMPARE("u", "\u00fc");
}
int main()
{
loc("C");
loc("de_DE.UTF-8");
loc("tr_TR.UTF-8");
return 0;
}
And the output I got was:
locale set to C
strcasecmp of i and I is 0
strcasecmp of i and İ is -91
strcasecmp of i and ı is -91
strcasecmp of I and ı is -91
strcasecmp of u and U is 0
strcasecmp of u and ü is -78
locale set to de_DE.UTF-8
strcasecmp of i and I is 0
strcasecmp of i and İ is -91
strcasecmp of i and ı is -91
strcasecmp of I and ı is -91
strcasecmp of u and U is 0
strcasecmp of u and ü is -78
locale set to tr_TR.UTF-8
strcasecmp of i and I is 32
strcasecmp of i and İ is -91
strcasecmp of i and ı is -91
strcasecmp of I and ı is -123
strcasecmp of u and U is 0
strcasecmp of u and ü is -78
And the bit about "strcasecmp of i and I is 32" is expected, but
why I get "strcasecmp of I and ı is -123", I don't know! Not that
it's too relevant, but surprising...
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk