diff options
Diffstat (limited to 'mailnews/compose/src')
-rw-r--r-- | mailnews/compose/src/nsMsgCompFields.cpp | 5 | ||||
-rw-r--r-- | mailnews/compose/src/nsMsgCompose.cpp | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/mailnews/compose/src/nsMsgCompFields.cpp b/mailnews/compose/src/nsMsgCompFields.cpp index c65e6ca17..24192f594 100644 --- a/mailnews/compose/src/nsMsgCompFields.cpp +++ b/mailnews/compose/src/nsMsgCompFields.cpp @@ -600,7 +600,7 @@ nsMsgCompFields::SplitRecipients(const nsAString &aRecipients, *aLength = 0; *aResult = nullptr; - nsCOMArray<msgIAddressObject> header(EncodedHeader(NS_ConvertUTF16toUTF8(aRecipients))); + nsCOMArray<msgIAddressObject> header(EncodedHeaderW(aRecipients)); nsTArray<nsString> results; if (aEmailAddressOnly) ExtractEmails(header, results); @@ -623,8 +623,7 @@ nsresult nsMsgCompFields::SplitRecipientsEx(const nsAString &recipients, nsTArray<nsMsgRecipient> &aResult) { nsTArray<nsString> names, addresses; - ExtractAllAddresses(EncodedHeader(NS_ConvertUTF16toUTF8(recipients)), names, - addresses); + ExtractAllAddresses(EncodedHeaderW(recipients), names, addresses); uint32_t numAddresses = names.Length(); for (uint32_t i = 0; i < numAddresses; ++i) diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp index 4ce8e8def..a7c2140ad 100644 --- a/mailnews/compose/src/nsMsgCompose.cpp +++ b/mailnews/compose/src/nsMsgCompose.cpp @@ -2646,15 +2646,13 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIRequest *request, ns } nsCString fromEmailAddress; - ExtractEmail(EncodedHeader(NS_ConvertUTF16toUTF8(from)), fromEmailAddress); + ExtractEmail(EncodedHeaderW(from), fromEmailAddress); nsTArray<nsCString> toEmailAddresses; - ExtractEmails(EncodedHeader(NS_ConvertUTF16toUTF8(to)), - UTF16ArrayAdapter<>(toEmailAddresses)); + ExtractEmails(EncodedHeaderW(to), UTF16ArrayAdapter<>(toEmailAddresses)); nsTArray<nsCString> ccEmailAddresses; - ExtractEmails(EncodedHeader(NS_ConvertUTF16toUTF8(cc)), - UTF16ArrayAdapter<>(ccEmailAddresses)); + ExtractEmails(EncodedHeaderW(cc), UTF16ArrayAdapter<>(ccEmailAddresses)); nsCOMPtr<nsIPrefBranch> prefs (do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); |