nsAutoString ucs2(mime_decode_string(*hdr_value, mailcharset)); char* utf8 = ucs2.ToNewUTF8String(); if (NULL != utf8) { mime_SACat(body, utf8); Recycle(utf8); } else mime_SACat(body, *hdr_value);
char* utf8 = MIME_DecodeMimeHeader(*hdr_value, mailcharset, PR_FALSE, PR_TRUE); if (NULL != utf8) { mime_SACat(body, utf8); PR_Free(utf8); } else { mime_SACat(body, *hdr_value); }
mime_intl_insert_message_header_1(char        **body,                                   char        **hdr_value,											            char        *hdr_str, 											            const char  *html_hdr_str,											            char        *mailcharset,											            PRBool      htmlEdit){	if (!body || !hdr_value || !hdr_str)		return;	if (htmlEdit)	{		mime_SACat(body, HEADER_START_JUNK);	}	else	{		mime_SACat(body, MSG_LINEBREAK);	}	if (!html_hdr_str)		html_hdr_str = hdr_str;	mime_SACat(body, html_hdr_str);	if (htmlEdit)	{		mime_SACat(body, HEADER_MIDDLE_JUNK);	}	else		mime_SACat(body, ": ");  // MIME decode header and convert to UTF-8  nsAutoString ucs2(mime_decode_string(*hdr_value, mailcharset));  char* utf8 = ucs2.ToNewUTF8String();  if (NULL != utf8) {    mime_SACat(body, utf8);    Recycle(utf8);  }  else     mime_SACat(body, *hdr_value); // raw MIME encoded string	if (htmlEdit)		mime_SACat(body, HEADER_END_JUNK);}