X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/charset/blobdiff_plain/36eb75644933f0cfb984f0509966a4015b93874c..5930e9efcc276c14e876e05e22aedbc0cd3013db:/localenc.c diff --git a/localenc.c b/localenc.c index f462729..f5fabee 100644 --- a/localenc.c +++ b/localenc.c @@ -47,6 +47,7 @@ static const struct { { "ISO-8859-16", CS_ISO8859_16, 1 }, { "CP437", CS_CP437, 1 }, { "CP850", CS_CP850, 1 }, + { "CP852", CS_CP852, 1 }, { "CP866", CS_CP866, 1 }, { "CP874", CS_CP874, 1 }, { "Win874", CS_CP874, 0 }, @@ -156,7 +157,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++; }