From: Oliver Kiddle Date: Fri, 21 Jan 2005 19:25:44 +0000 (+0000) Subject: US-ASCII is a subset of UTF-8 so can be handled directly when UTF-8 is X-Git-Tag: RELEASE_1_2~52 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=e345f8fdce3a18cab73f3edf65ca60f8357efda0;p=mmh US-ASCII is a subset of UTF-8 so can be handled directly when UTF-8 is being used --- diff --git a/ChangeLog b/ChangeLog index b29df86..5594bfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-21 Oliver Kiddle + + * sbr/check_charset.c US-ASCII is a subset of UTF-8 so can be + handled directly when UTF-8 is being used + 2004-12-17 Oliver Kiddle * uip/mhmisc.c Fix -part option to mhshow/mhlist/mhstore to diff --git a/sbr/check_charset.c b/sbr/check_charset.c index 5d98774..f45448d 100644 --- a/sbr/check_charset.c +++ b/sbr/check_charset.c @@ -32,8 +32,9 @@ check_charset (char *str, int len) mm_charset = "US-ASCII"; mm_len = strlen (mm_charset); - /* US-ASCII is a subset of the ISO-8859-X character sets */ - if (!strncasecmp("ISO-8859-", mm_charset, 9)) { + /* US-ASCII is a subset of the ISO-8859-X and UTF-8 character sets */ + if (!strncasecmp("ISO-8859-", mm_charset, 9) || + !strcasecmp("UTF-8", mm_charset)) { alt_charset = "US-ASCII"; alt_len = strlen (alt_charset); }