diff options
author | Sami Farin <safari-mutt@safari.iki.fi> | 2007-03-12 10:03:12 -0700 |
---|---|---|
committer | Sami Farin <safari-mutt@safari.iki.fi> | 2007-03-12 10:03:12 -0700 |
commit | b3813a6b4cb511047e0388bf252c551cbfef9b34 (patch) | |
tree | 25ee0b9256f841ef078e84824eabba79e7e41375 /charset.c | |
parent | b881ce1f4bda001cd69d7f1c949f2213e34a97cb (diff) |
Improve strcat usage (#2802).
Diffstat (limited to 'charset.c')
-rw-r--r-- | charset.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -245,6 +245,11 @@ void mutt_canonical_charset (char *dest, size_t dlen, const char *name) char *p; char scratch[LONG_STRING]; + if (!ascii_strcasecmp (name, "utf-8")) { + strfcpy (dest, name, dlen); + goto found_utf8; + } + /* catch some common iso-8859-something misspellings */ if (!ascii_strncasecmp (name, "8859", 4) && name[4] != '-') snprintf (scratch, sizeof (scratch), "iso-8859-%s", name +4); @@ -267,6 +272,7 @@ void mutt_canonical_charset (char *dest, size_t dlen, const char *name) strfcpy (dest, scratch, dlen); +found_utf8: /* for cosmetics' sake, transform to lowercase. */ for (p = dest; *p; p++) *p = ascii_tolower (*p); |