ctype functions require their argument to be EOF or representable as an
[sgt/charset] / xenc.c
diff --git a/xenc.c b/xenc.c
index d27dafb..ba1c283 100644 (file)
--- a/xenc.c
+++ b/xenc.c
@@ -83,7 +83,7 @@ int charset_from_xenc(const char *name)
        p = name;
        q = xencs[i].name;
        while (*p || *q) {
-           if (tolower(*p) != tolower(*q))
+               if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
                break;
            p++; q++;
        }