diff options
-rw-r--r-- | mailnews/base/search/src/nsMsgImapSearch.cpp | 10 | ||||
-rw-r--r-- | mailnews/compose/src/nsMsgCompUtils.cpp | 2 |
2 files changed, 6 insertions, 6 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"); diff --git a/mailnews/compose/src/nsMsgCompUtils.cpp b/mailnews/compose/src/nsMsgCompUtils.cpp index 4615f0f36..6632e3257 100644 --- a/mailnews/compose/src/nsMsgCompUtils.cpp +++ b/mailnews/compose/src/nsMsgCompUtils.cpp @@ -975,7 +975,7 @@ RFC2231ParmFolding(const char *parmName, const nsCString& charset, bool needEscape; nsCString dupParm; - if (!NS_IsAscii(parmValue.get()) || is7bitCharset(charset)) { + if (!NS_IsAscii(static_cast<const char16_t*>(parmValue.get())) || is7bitCharset(charset)) { needEscape = true; nsAutoCString nativeParmValue; ConvertFromUnicode(charset.get(), parmValue, nativeParmValue); |