From 5683d9ec949edf25d1c6d8e9ef1e2ef9a134ef2a Mon Sep 17 00:00:00 2001 From: "nhotta%netscape.com" Date: Wed, 18 Jul 2001 19:46:03 +0000 Subject: [PATCH] When the pref "mail.strictly_mime_headers" is off, send as mail charset instead of UTF-8, bug 68394, r=ducarroz,sr=bienvenu. --- mailnews/base/util/nsMsgI18N.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mailnews/base/util/nsMsgI18N.cpp b/mailnews/base/util/nsMsgI18N.cpp index 80184be1335..20585b17046 100644 --- a/mailnews/base/util/nsMsgI18N.cpp +++ b/mailnews/base/util/nsMsgI18N.cpp @@ -385,9 +385,13 @@ const nsString& nsMsgI18NFileSystemCharset() // MIME encoder, output string should be freed by PR_FREE char * nsMsgI18NEncodeMimePartIIStr(const char *header, const char *charset, PRBool bUseMime) { - // No MIME, just duplicate the string. + // No MIME, convert to the outgoing mail charset. if (PR_FALSE == bUseMime) { - return PL_strdup(header); + char *convertedStr; + if (NS_SUCCEEDED(ConvertFromUnicode(NS_ConvertASCIItoUCS2(charset), NS_ConvertUTF8toUCS2(header), &convertedStr))) + return (convertedStr); + else + return PL_strdup(header); } char *encodedString = nsnull;