if (NS_SUCCEEDED(ConvertFromUnicode(NS_ConvertASCIItoUCS2(charset), NS_ConvertUTF8toUCS2(header), &convertedStr)))
if (NS_SUCCEEDED(ConvertFromUnicode(charset, NS_ConvertUTF8toUCS2(header), &convertedStr)))
char * nsMsgI18NEncodeMimePartIIStr(const char *header, const char *charset, PRBool bUseMime) {  // No MIME, convert to the outgoing mail charset.  if (PR_FALSE == bUseMime) {    char *convertedStr;    if (NS_SUCCEEDED(ConvertFromUnicode(NS_ConvertASCIItoUCS2(charset), NS_ConvertUTF8toUCS2(header), &convertedStr)))      return (convertedStr);    else      return PL_strdup(header);  }  char *encodedString = nsnull;  nsIMimeConverter *converter;  nsresult res = nsComponentManager::CreateInstance(kCMimeConverterCID, nsnull,                                            NS_GET_IID(nsIMimeConverter), (void **)&converter);  if (NS_SUCCEEDED(res) && nsnull != converter) {    res = converter->EncodeMimePartIIStr_UTF8(header, charset, kMIME_ENCODED_WORD_SIZE, &encodedString);    NS_RELEASE(converter);  }  return NS_SUCCEEDED(res) ? encodedString : nsnull;}