зеркало из https://github.com/mozilla/gecko-dev.git
bug 85310 remove *WithConversion from necko r+sr=darin
This commit is contained in:
Родитель
11162ccd8e
Коммит
7f707d30dd
|
@ -1010,7 +1010,8 @@ nsFtpState::S_user() {
|
|||
mUsername = user;
|
||||
mPassword = passwd;
|
||||
}
|
||||
usernameStr.AppendWithConversion(mUsername);
|
||||
// XXX Is UTF-8 the best choice?
|
||||
AppendUTF16toUTF8(mUsername, usernameStr);
|
||||
}
|
||||
usernameStr.Append(CRLF);
|
||||
|
||||
|
@ -1107,8 +1108,8 @@ nsFtpState::S_pass() {
|
|||
|
||||
mPassword = passwd;
|
||||
}
|
||||
// XXX mPassword may contain non-ASCII characters! what do we do?
|
||||
passwordStr.AppendWithConversion(mPassword);
|
||||
// XXX Is UTF-8 the best choice?
|
||||
AppendUTF16toUTF8(mPassword, passwordStr);
|
||||
}
|
||||
passwordStr.Append(CRLF);
|
||||
|
||||
|
|
|
@ -648,7 +648,7 @@ nsGopherChannel::SendRequest()
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
mRequest.Append('\t');
|
||||
mRequest.AppendWithConversion(search.get());
|
||||
AppendUTF16toUTF8(search, mRequest); // XXX Is UTF-8 the right thing?
|
||||
|
||||
// and update our uri
|
||||
nsCAutoString spec;
|
||||
|
@ -657,7 +657,7 @@ nsGopherChannel::SendRequest()
|
|||
return rv;
|
||||
|
||||
spec.Append('?');
|
||||
spec.AppendWithConversion(search.get());
|
||||
AppendUTF16toUTF8(search, spec);
|
||||
rv = mUrl->SetSpec(spec);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
|
|
@ -108,7 +108,7 @@ nsHttpBasicAuth::GenerateCredentials(nsIHttpChannel *httpChannel,
|
|||
LossyCopyUTF16toASCII(user, userpass);
|
||||
userpass.Append(':'); // always send a ':' (see bug 129565)
|
||||
if (password)
|
||||
userpass.AppendWithConversion(password);
|
||||
LossyAppendUTF16toASCII(password, userpass);
|
||||
|
||||
// plbase64.h provides this worst-case output buffer size calculation.
|
||||
// use calloc, since PL_Base64Encode does not null terminate.
|
||||
|
|
|
@ -632,6 +632,7 @@ mozTXTToHTMLConv::NumberOfMatches(const PRUnichar * aInString, PRInt32 aInString
|
|||
|
||||
|
||||
// NOTE: the converted html for the phrase is appended to aOutString
|
||||
// tagHTML and attributeHTML are plain ASCII (literal strings, in fact)
|
||||
PRBool
|
||||
mozTXTToHTMLConv::StructPhraseHit(const PRUnichar * aInString, PRInt32 aInStringLength, PRBool col0,
|
||||
const PRUnichar* tagTXT, PRInt32 aTagTXTLen,
|
||||
|
@ -664,9 +665,9 @@ mozTXTToHTMLConv::StructPhraseHit(const PRUnichar * aInString, PRInt32 aInString
|
|||
{
|
||||
openTags++;
|
||||
aOutString.AppendLiteral("<");
|
||||
aOutString.AppendWithConversion(tagHTML);
|
||||
aOutString.AppendASCII(tagHTML);
|
||||
aOutString.Append(PRUnichar(' '));
|
||||
aOutString.AppendWithConversion(attributeHTML);
|
||||
aOutString.AppendASCII(attributeHTML);
|
||||
aOutString.AppendLiteral("><span class=\"moz-txt-tag\">");
|
||||
aOutString.Append(tagTXT);
|
||||
aOutString.AppendLiteral("</span>");
|
||||
|
@ -681,7 +682,7 @@ mozTXTToHTMLConv::StructPhraseHit(const PRUnichar * aInString, PRInt32 aInString
|
|||
aOutString.AppendLiteral("<span class=\"moz-txt-tag\">");
|
||||
aOutString.Append(tagTXT);
|
||||
aOutString.AppendLiteral("</span></");
|
||||
aOutString.AppendWithConversion(tagHTML);
|
||||
aOutString.AppendASCII(tagHTML);
|
||||
aOutString.Append(PRUnichar('>'));
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ nsTXTToHTMLConv::OnDataAvailable(nsIRequest* request, nsISupports *aContext,
|
|||
|
||||
buffer[read] = '\0';
|
||||
// XXX charsets?? non-latin1 characters?? utf-16??
|
||||
mBuffer.AppendWithConversion(buffer);
|
||||
AppendASCIItoUTF16(buffer, mBuffer);
|
||||
amtRead += read;
|
||||
|
||||
PRInt32 front = -1, back = -1, tokenLoc = -1, cursor = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче