diff options
Diffstat (limited to 'mailnews/base/search')
-rw-r--r-- | mailnews/base/search/src/nsMsgImapSearch.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mailnews/base/search/src/nsMsgImapSearch.cpp b/mailnews/base/search/src/nsMsgImapSearch.cpp index 5b3b2698a..09442aeea 100644 --- a/mailnews/base/search/src/nsMsgImapSearch.cpp +++ b/mailnews/base/search/src/nsMsgImapSearch.cpp @@ -119,22 +119,22 @@ nsresult nsMsgSearchOnlineMail::Encode (nsCString& pEncoding, rv = searchValue->GetStr(pchar); if (NS_FAILED(rv) || pchar.IsEmpty()) continue; - asciiOnly = NS_IsAscii(pchar.get()); + asciiOnly = NS_IsAscii(static_cast<const char16_t*>(pchar.get())); } } } // else // asciiOnly = false; // TODO: enable this line when the condition is not a plain "true" in the if(). - nsAutoString usAsciiCharSet(NS_LITERAL_STRING("us-ascii")); + const char16_t* usAsciiCharSet = u"us-ascii"; // Get the optional CHARSET parameter, in case we need it. - char *csname = GetImapCharsetParam(asciiOnly ? usAsciiCharSet.get() : destCharset); + char *csname = GetImapCharsetParam(asciiOnly ? usAsciiCharSet : destCharset); // We do not need "srcCharset" since the search term in always unicode. // I just pass destCharset for both src and dest charset instead of removing srcCharst from the arguemnt. nsresult err = nsMsgSearchAdapter::EncodeImap (getter_Copies(imapTerms), searchTerms, - asciiOnly ? usAsciiCharSet.get(): destCharset, - asciiOnly ? usAsciiCharSet.get(): destCharset, false); + asciiOnly ? usAsciiCharSet : destCharset, + asciiOnly ? usAsciiCharSet : destCharset, false); if (NS_SUCCEEDED(err)) { pEncoding.Append("SEARCH"); |