ctype functions require their argument to be EOF or representable as an
[sgt/charset] / localenc.c
index f462729..cd08cab 100644 (file)
@@ -156,7 +156,7 @@ int charset_from_localenc(const char *name)
        p = name;
        q = localencs[i].name;
        while (*p || *q) {
-           if (tolower(*p) != tolower(*q))
+               if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
                break;
            p++; q++;
        }