Silly of me to overlook it: another obvious way you might like to
[sgt/charset] / emacsenc.c
index f1046bb..ac49939 100644 (file)
@@ -118,7 +118,7 @@ int charset_from_emacsenc(const char *name)
        p = name;
        q = emacsencs[i].name;
        while (*p || *q) {
-           if (tolower(*p) != tolower(*q))
+               if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
                break;
            p++; q++;
        }