From 91496d37c72b040ae899058564e71814a501e53b Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 11 Jan 2009 14:20:34 +0000 Subject: [PATCH] Propagate my ctype fixes (r8404) from libcharset. [originally from svn r8405] [r8404 == 7fce7161db885ed7f0fa0c06f27d58d789a23b62 in charset repository] --- charset/localenc.c | 2 +- charset/mimeenc.c | 2 +- charset/xenc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charset/localenc.c b/charset/localenc.c index 4d81f50f..22088877 100644 --- a/charset/localenc.c +++ b/charset/localenc.c @@ -102,7 +102,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++; } diff --git a/charset/mimeenc.c b/charset/mimeenc.c index 437781f6..93ad89e7 100644 --- a/charset/mimeenc.c +++ b/charset/mimeenc.c @@ -202,7 +202,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++; } diff --git a/charset/xenc.c b/charset/xenc.c index b6532f29..11787978 100644 --- a/charset/xenc.c +++ b/charset/xenc.c @@ -81,7 +81,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++; }