X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/charset/blobdiff_plain/3f2ff6ae4c90bc84a47952980b14991f817289f2..HEAD:/xenc.c diff --git a/xenc.c b/xenc.c index 7d5a86a..1b77be7 100644 --- a/xenc.c +++ b/xenc.c @@ -40,7 +40,7 @@ static const struct { { "fcd8859-15", CS_ISO8859_15 }, { "hp-roman8", CS_HP_ROMAN8 }, { "koi8-r", CS_KOI8_R }, - { "jisx0201.1976-0, CS_JISX0201 }, + { "jisx0201.1976-0", CS_JISX0201 }, /* * Unofficial encoding names found in the wild. */ @@ -48,6 +48,8 @@ static const struct { { "koi8-u", CS_KOI8_U }, { "ibm-cp437", CS_CP437 }, { "ibm-cp850", CS_CP850 }, + { "ibm-cp852", CS_CP852 }, + { "ibm-cp866", CS_CP866 }, { "microsoft-cp1250", CS_CP1250 }, { "microsoft-cp1251", CS_CP1251 }, { "microsoft-cp1252", CS_CP1252 }, @@ -82,7 +84,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++; }