Sebastian Kuschel reports that pfd_closing can be called for a socket
[u/mdw/putty] / charset / mimeenc.c
index b255c65..fb9243c 100644 (file)
@@ -135,6 +135,16 @@ static const struct {
     { "850", CS_CP850 },
     { "csPC850Multilingual", CS_CP850 },
 
+    { "IBM852", CS_CP852 },
+    { "cp852", CS_CP852 },
+    { "852", CS_CP852 },
+    { "csIBM852", CS_CP852 },
+
+    { "IBM866", CS_CP866 },
+    { "cp866", CS_CP866 },
+    { "866", CS_CP866 },
+    { "csIBM866", CS_CP866 },
+
     { "windows-1250", CS_CP1250 },
 
     { "windows-1251", CS_CP1251 },
@@ -197,7 +207,7 @@ int charset_from_mimeenc(const char *name)
        p = name;
        q = mimeencs[i].name;
        while (*p || *q) {
-           if (tolower(*p) != tolower(*q))
+               if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
                break;
            p++; q++;
        }