diff --git a/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index 90b2db5339e..bcbb8d12e39 100644 --- a/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/mozilla/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -1290,7 +1290,7 @@ nsWebBrowserPersist::GetExtensionForContentType(const PRUnichar *aContentType, P rv = mMIMEService->GetPrimaryExtension(contentType, EmptyCString(), ext); if (NS_SUCCEEDED(rv)) { - *aExt = ToNewUnicode(ext); + *aExt = UTF8ToNewUnicode(ext); NS_ENSURE_TRUE(*aExt, NS_ERROR_OUT_OF_MEMORY); return NS_OK; } diff --git a/mozilla/mailnews/mime/src/mimemoz2.cpp b/mozilla/mailnews/mime/src/mimemoz2.cpp index 5e7c37cc207..85c04d01405 100644 --- a/mozilla/mailnews/mime/src/mimemoz2.cpp +++ b/mozilla/mailnews/mime/src/mimemoz2.cpp @@ -287,7 +287,7 @@ ValidateRealName(nsMsgAttachmentData *aAttach, MimeHeaders *aHdrs) if (NS_SUCCEEDED(rv) && !fileExtension.IsEmpty()) { newAttachName.Append(PRUnichar('.')); - newAttachName.AppendWithConversion(fileExtension); + AppendUTF8toUTF16(fileExtension, newAttachName); } }