- base64_encode(tmp, val, strlen(val));
- g_string_append_printf(buf, "%s=\"=?UTF-8?B?%s?=\"", param, tmp);
+ codeconv_set_strict(TRUE);
+ conv_encode_header_full(tmp, len, val, pdata->len + strlen(param) + 4 , FALSE,
+ prefs_common.outgoing_charset);
+ codeconv_set_strict(FALSE);
+ if (!tmp || !*tmp) {
+ codeconv_set_strict(TRUE);
+ conv_encode_header_full(tmp, len, val, pdata->len + strlen(param) + 4 , FALSE,
+ conv_get_outgoing_charset_str());
+ codeconv_set_strict(FALSE);
+ }
+ if (!tmp || !*tmp) {
+ codeconv_set_strict(TRUE);
+ conv_encode_header_full(tmp, len, val, pdata->len + strlen(param) + 4 , FALSE,
+ CS_UTF_8);
+ codeconv_set_strict(FALSE);
+ }
+ if (!tmp || !*tmp) {
+ conv_encode_header_full(tmp, len, val, pdata->len + strlen(param) + 4 , FALSE,
+ CS_UTF_8);
+ }
+ g_string_append_printf(buf, "%s=\"%s\"", param, tmp);