fprintf (f, "Content-Type: %s/%s", TYPE (a), a->subtype);
if (a->parameter) {
fprintf (f, "Content-Type: %s/%s", TYPE (a), a->subtype);
if (a->parameter) {
len = 25 + m_strlen(a->subtype); /* approximate len. of content-type */
for (p = a->parameter; p; p = p->next) {
len = 25 + m_strlen(a->subtype); /* approximate len. of content-type */
for (p = a->parameter; p; p = p->next) {
if (a->type == TYPEMULTIPART) {
/* First, find the boundary to use */
if (a->type == TYPEMULTIPART) {
/* First, find the boundary to use */
cd[i] = mutt_iconv_open (tocodes[i], "UTF-8", 0);
else
/* Special case for conversion to UTF-8 */
cd[i] = mutt_iconv_open (tocodes[i], "UTF-8", 0);
else
/* Special case for conversion to UTF-8 */
ub = bufu, ubl = ubl1;
ob = bufo, obl = sizeof (bufo);
n = my_iconv(cd[i], (ibl || ubl) ? &ub : 0, &ubl, &ob, &obl);
ub = bufu, ubl = ubl1;
ob = bufo, obl = sizeof (bufo);
n = my_iconv(cd[i], (ibl || ubl) ? &ub : 0, &ubl, &ob, &obl);
update_content_info (&infos[i], &states[i], bufo, ob - bufo);
}
}
update_content_info (&infos[i], &states[i], bufo, ob - bufo);
}
}
/* Special case for conversion to UTF-8 */
update_content_info (&infos[i], &states[i], bufu, ubl1);
/* Special case for conversion to UTF-8 */
update_content_info (&infos[i], &states[i], bufu, ubl1);
char *fchs = b->use_disp ? ((FileCharset && *FileCharset) ?
FileCharset : Charset) : Charset;
if (Charset && (chs || SendCharset) &&
convert_file_from_to (fp, fchs, chs ? chs : SendCharset,
&fromcode, &tocode, info) != -1) {
if (!chs) {
char *fchs = b->use_disp ? ((FileCharset && *FileCharset) ?
FileCharset : Charset) : Charset;
if (Charset && (chs || SendCharset) &&
convert_file_from_to (fp, fchs, chs ? chs : SendCharset,
&fromcode, &tocode, info) != -1) {
if (!chs) {
mutt_set_parameter ("charset", chsbuf, &b->parameter);
}
b->file_charset = fromcode;
mutt_set_parameter ("charset", chsbuf, &b->parameter);
}
b->file_charset = fromcode;
if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset))
mutt_set_parameter ("charset", (!info->hibin ? "us-ascii" :
Charset
if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset))
mutt_set_parameter ("charset", (!info->hibin ? "us-ascii" :
Charset