projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nico Golde:
[apps/madmutt.git]
/
sendlib.c
diff --git
a/sendlib.c
b/sendlib.c
index
281f9e3
..
9ebab5e
100644
(file)
--- a/
sendlib.c
+++ b/
sendlib.c
@@
-509,7
+509,7
@@
int mutt_write_mime_body (BODY *a, FILE *f)
}
if (a->type == TYPETEXT && (!a->noconv))
}
if (a->type == TYPETEXT && (!a->noconv))
- fc = fgetconv_open (fpin,
C
harset,
+ fc = fgetconv_open (fpin,
a->file_c
harset,
mutt_get_body_charset (send_charset, sizeof (send_charset), a),
0);
else
mutt_get_body_charset (send_charset, sizeof (send_charset), a),
0);
else
@@
-909,6
+909,7
@@
CONTENT *mutt_get_content_info (const char *fname, BODY *b)
CONTENT *info;
CONTENT_STATE state;
FILE *fp = NULL;
CONTENT *info;
CONTENT_STATE state;
FILE *fp = NULL;
+ char *fromcode;
char *tocode;
char buffer[100];
char chsbuf[STRING];
char *tocode;
char buffer[100];
char chsbuf[STRING];
@@
-943,15
+944,18
@@
CONTENT *mutt_get_content_info (const char *fname, BODY *b)
if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset))
{
char *chs = mutt_get_parameter ("charset", b->parameter);
if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset))
{
char *chs = mutt_get_parameter ("charset", b->parameter);
+ char *fchs = b->use_disp ? ((FileCharset && *FileCharset) ?
+ FileCharset : Charset) : Charset;
if (Charset && (chs || SendCharset) &&
if (Charset && (chs || SendCharset) &&
-
convert_file_from_to (fp, Charset
, chs ? chs : SendCharset,
-
0
, &tocode, info) != (size_t)(-1))
+
convert_file_from_to (fp, fchs
, chs ? chs : SendCharset,
+
&fromcode
, &tocode, info) != (size_t)(-1))
{
if (!chs)
{
mutt_canonical_charset (chsbuf, sizeof (chsbuf), tocode);
mutt_set_parameter ("charset", chsbuf, &b->parameter);
}
{
if (!chs)
{
mutt_canonical_charset (chsbuf, sizeof (chsbuf), tocode);
mutt_set_parameter ("charset", chsbuf, &b->parameter);
}
+ b->file_charset = fromcode;
FREE (&tocode);
safe_fclose (&fp);
return info;
FREE (&tocode);
safe_fclose (&fp);
return info;
@@
-1334,6
+1338,7
@@
BODY *mutt_make_message_attach (CONTEXT *ctx, HEADER *hdr, int attach_msg)
body->unlink = 1;
body->use_disp = 0;
body->disposition = DISPINLINE;
body->unlink = 1;
body->use_disp = 0;
body->disposition = DISPINLINE;
+ body->noconv = 1;
mutt_parse_mime_message (ctx, hdr);
mutt_parse_mime_message (ctx, hdr);