diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2000-09-27 14:28:35 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2000-09-27 14:28:35 +0000 |
commit | f9cf6f5528b339b875aec879528a7daffa13219b (patch) | |
tree | f8b5074f59973d4a80c8ad91c2950749b08eb820 /charset.c | |
parent | 50ae56c32359cd9ab371a9db70a84c3e09155e0c (diff) |
Catch another error condition which may be caused by a broken
nl_langinfo() function.
Diffstat (limited to 'charset.c')
-rw-r--r-- | charset.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -200,7 +200,8 @@ void mutt_set_langinfo_charset (void) mutt_canonical_charset (buff2, sizeof (buff2), buff); /* finally, set $charset */ - Charset = safe_strdup (buff); + if (!(Charset = safe_strdup (buff))) + Charset = safe_strdup ("iso-8859-1"); } #endif @@ -213,7 +214,9 @@ void mutt_canonical_charset (char *dest, size_t dlen, const char *name) /* catch some common iso-8859-something misspellings */ if (!mutt_strncasecmp (name, "iso8859", 7) && name[7] != '-') - snprintf (scratch, sizeof (scratch), "iso_8859-%s", name + 8); + snprintf (scratch, sizeof (scratch), "iso_8859-%s", name + 7); + else if (!mutt_strncasecmp (name, "iso8859-", 8)) + snprintf (scratch, sizeof (scratch), "iso8859-%s", name + 8); else strfcpy (scratch, NONULL(name), sizeof (scratch)); |