summaryrefslogtreecommitdiffstats
path: root/copy.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-09-11 10:50:37 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-09-11 10:50:37 +0000
commit7777fb663e7b295731b226baf3df5f9186345763 (patch)
tree08bda6d710ae50256b671355c8cbb6b00cd63d43 /copy.c
parent775b6121790dcfbb39174896011e4e39a1bdbacd (diff)
Fix some more character set glitches.
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/copy.c b/copy.c
index 58194003..1a9c61ca 100644
--- a/copy.c
+++ b/copy.c
@@ -284,16 +284,18 @@ int
mutt_copy_header (FILE *in, HEADER *h, FILE *out, int flags, const char *prefix)
{
char buffer[SHORT_STRING];
-
+
if (mutt_copy_hdr (in, out, h->offset, h->content->offset, flags, prefix) == -1)
return (-1);
if (flags & CH_TXTPLAIN)
{
+ char chsbuf[SHORT_STRING];
fputs ("Mime-Version: 1.0\n", out);
fputs ("Content-Transfer-Encoding: 8bit\n", out);
fputs ("Content-Type: text/plain; charset=", out);
- rfc822_cat(buffer, sizeof(buffer), Charset ? Charset : "", MimeSpecials);
+ mutt_canonical_charset (chsbuf, sizeof (chsbuf), Charset ? Charset : "us-ascii");
+ rfc822_cat(buffer, sizeof(buffer), chsbuf, MimeSpecials);
fputs(buffer, out);
fputc('\n', out);