diff --git a/mailnews/base/src/nsMsgWindow.cpp b/mailnews/base/src/nsMsgWindow.cpp index 115dd2273f8..84caab0fdbf 100644 --- a/mailnews/base/src/nsMsgWindow.cpp +++ b/mailnews/base/src/nsMsgWindow.cpp @@ -517,26 +517,15 @@ nsMsgWindow::DisplayHTMLInMessagePane(const PRUnichar *title, const PRUnichar *b { nsresult rv; - nsCAutoString charSet; - charSet.AssignWithConversion(nsMsgI18NFileSystemCharset()); - - nsAutoString htmlStr; - htmlStr.Append(NS_LITERAL_STRING("").get()); - htmlStr.Append(NS_LITERAL_STRING("").get()); - htmlStr.Append(NS_LITERAL_STRING("").get()); + nsString htmlStr; + htmlStr.Append(NS_LITERAL_STRING("").get()); htmlStr.Append(body); htmlStr.Append(NS_LITERAL_STRING("").get()); - nsCAutoString convertedHtml; - rv = nsMsgI18NConvertFromUnicode(charSet,htmlStr,convertedHtml); - NS_ENSURE_SUCCESS(rv,rv); - - char *encodedHtml = PL_Base64Encode((const char *)convertedHtml, 0, nsnull); + char *encodedHtml = PL_Base64Encode(NS_ConvertUCS2toUTF8(htmlStr).get(), 0, nsnull); if (!encodedHtml) return NS_ERROR_OUT_OF_MEMORY; - nsCAutoString dataSpec; + nsCString dataSpec; dataSpec = "data:text/html;base64,"; dataSpec += encodedHtml;