--- linux-2.6.7-rc3/fs/fat/dir.c 2004-06-07 15:13:36.000000000 -0400 +++ linux-2.6.7-rc3.fatutf8/fs/fat/dir.c 2004-06-15 12:51:17.194067029 -0400 @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -98,6 +99,8 @@ { unsigned char nc = t->charset2lower[c]; + printk("nc = %c, c = %c\n", nc, c); + return nc ? nc : c; } @@ -144,9 +147,20 @@ fat_strnicmp(struct nls_table *t, const unsigned char *s1, const unsigned char *s2, int len) { - while(len--) - if (fat_tolower(t, *s1++) != fat_tolower(t, *s2++)) - return 1; + int utf8; + + utf8 = !strcmp(t->charset, "utf8"); + + if (utf8) { + while(len--) + if (tolower(*s1++) != tolower(*s2++)) + return 1; + } + else { + while(len--) + if (fat_tolower(t, *s1++) != fat_tolower(t, *s2++)) + return 1; + } return 0; }