summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-12-15 22:00:55 -0700
committerEduardo Chappa <chappa@washington.edu>2018-12-15 22:00:55 -0700
commitc7e14ba2c2ac2a858539dcb4f077d8fb03988c06 (patch)
treef98388f3c73432b988becbc9c18c6001ce33b4ef
parente41a0aae6dc5bf8190d3f2bb077af93aea157d4c (diff)
downloadalpine-c7e14ba2c2ac2a858539dcb4f077d8fb03988c06.tar.xz
* Some messages are mislabeled as iso-8859-1 when in reality
they are windows-1252, so we treat them as windows-1252 from the beginning. If we did not make this change, we might see '?' characters in the displayed message, without an apparent explanation of this fact. Reported by Holger Trapp.
-rw-r--r--pith/detach.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pith/detach.c b/pith/detach.c
index b9f50a52..298095dd 100644
--- a/pith/detach.c
+++ b/pith/detach.c
@@ -219,6 +219,17 @@ detach(MAILSTREAM *stream, /* c-client stream to use */
charset = cpystr(ps_global->VAR_UNK_CHAR_SET);
}
+ /* some messages are mislabeled as iso-8859-1 when in reality
+ * they are windows-1252, so we treat them as windows-1252
+ * from the beginning. If we did not make this change, we might
+ * see '?' characters in the message, without an apparent explanation
+ * of this fact.
+ */
+ if(charset && !strucmp(charset, "iso-8859-1")){
+ fs_give((void **) &charset);
+ charset = cpystr("windows-1252");
+ }
+
/* convert to UTF-8 */
if(!(charset && !strucmp(charset, "utf-8")))
gf_link_filter(gf_utf8, gf_utf8_opt(charset));