diff --git a/mozilla/htmlparser/src/nsScanner.cpp b/mozilla/htmlparser/src/nsScanner.cpp
index 52c8dba59d0..a2bf6fc5175 100644
--- a/mozilla/htmlparser/src/nsScanner.cpp
+++ b/mozilla/htmlparser/src/nsScanner.cpp
@@ -255,7 +255,7 @@ PRBool nsScanner::Append(const char* aBuffer, PRUint32 aLen){
do {
PRInt32 srcLength = aLen;
PRInt32 unicharLength = unicharBufLen;
- res = mUnicodeDecoder->Convert(unichars, 0, &unicharLength,aBuffer, 0, &srcLength );
+ res = mUnicodeDecoder->Convert(aBuffer, &srcLength, unichars, &unicharLength);
unichars[unicharLength]=0; //add this since the unicode converters can't be trusted to do so.
diff --git a/mozilla/intl/chardet/tools/GenCyrillicClass.cpp b/mozilla/intl/chardet/tools/GenCyrillicClass.cpp
index 4c87fc9c7af..f30d7d54ca6 100644
--- a/mozilla/intl/chardet/tools/GenCyrillicClass.cpp
+++ b/mozilla/intl/chardet/tools/GenCyrillicClass.cpp
@@ -85,7 +85,7 @@ PRUint8 CyrillicClass(nsIUnicodeDecoder* decoder, PRUint8 byte)
PRInt32 blen = 1;
PRInt32 ulen = 1;
- nsresult res = decoder->Convert(ubuf,0,&ulen, (char*)&byte, 0, &blen);
+ nsresult res = decoder->Convert((char*)&byte, &blen, ubuf, &ulen);
if(NS_SUCCEEDED(res) && (1 == ulen ))
{
ubuf[0] = nsCRT::ToUpper(ubuf[0]);
diff --git a/mozilla/intl/locale/src/mac/nsDateTimeFormatMac.cpp b/mozilla/intl/locale/src/mac/nsDateTimeFormatMac.cpp
index f791f829c42..f14e4523f9b 100644
--- a/mozilla/intl/locale/src/mac/nsDateTimeFormatMac.cpp
+++ b/mozilla/intl/locale/src/mac/nsDateTimeFormatMac.cpp
@@ -360,8 +360,8 @@ nsresult nsDateTimeFormatMac::FormatTMTime(nsILocale* locale,
PRUnichar *unichars = new PRUnichar [ unicharLength ];
if (nsnull != unichars) {
- res = decoder->Convert(unichars, 0, &unicharLength,
- aBuffer, 0, &srcLength);
+ res = decoder->Convert(aBuffer, &srcLength,
+ unichars, &unicharLength);
if (NS_SUCCEEDED(res)) {
stringOut.SetString(unichars, unicharLength);
}
diff --git a/mozilla/intl/locale/src/unix/nsDateTimeFormatUnix.cpp b/mozilla/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
index 0bfd299bad7..b3ba355379c 100644
--- a/mozilla/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
+++ b/mozilla/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
@@ -152,8 +152,8 @@ nsresult nsDateTimeFormatUnix::FormatTMTime(nsILocale* locale,
PRUnichar *unichars = new PRUnichar [ unicharLength ];
if (nsnull != unichars) {
- res = decoder->Convert(unichars, 0, &unicharLength,
- strOut, 0, &srcLength);
+ res = decoder->Convert(strOut, &srcLength,
+ unichars, &unicharLength);
if (NS_SUCCEEDED(res)) {
stringOut.SetString(unichars, unicharLength);
}
diff --git a/mozilla/intl/locale/src/windows/nsDateTimeFormatWin.cpp b/mozilla/intl/locale/src/windows/nsDateTimeFormatWin.cpp
index 425ecc27eba..a5ca0fd8ccd 100644
--- a/mozilla/intl/locale/src/windows/nsDateTimeFormatWin.cpp
+++ b/mozilla/intl/locale/src/windows/nsDateTimeFormatWin.cpp
@@ -242,8 +242,8 @@ nsresult nsDateTimeFormatWin::ConvertToUnicode(const char *inString, const PRInt
PRUnichar *unichars = outString;
if (nsnull != unichars) {
- res = decoder->Convert(unichars, 0, &unicharLength,
- inString, 0, &srcLength);
+ res = decoder->Convert(inString, &srcLength,
+ unichars, &unicharLength);
if (NS_SUCCEEDED(res)) {
*outLen = unicharLength;
}
diff --git a/mozilla/intl/uconv/tests/convperf.cpp b/mozilla/intl/uconv/tests/convperf.cpp
index f1898c135cd..fb0a59365e4 100644
--- a/mozilla/intl/uconv/tests/convperf.cpp
+++ b/mozilla/intl/uconv/tests/convperf.cpp
@@ -152,7 +152,7 @@ int main(int argc, const char** argv)
{
medsize=MEDBUFSIZE;
- res = decoder->Convert(medbuffer, 0, &medsize,inbuffer,0,&insize);
+ res = decoder->Convert(inbuffer,&insize, medbuffer, &medsize);
if(NS_FAILED(res)) {
fprintf(stderr, "failed in decoder->Convert %x\n",res);
return -1;
diff --git a/mozilla/intl/uconv/tests/nsTestUConv.cpp b/mozilla/intl/uconv/tests/nsTestUConv.cpp
index 8990bceeceb..748a43495cc 100644
--- a/mozilla/intl/uconv/tests/nsTestUConv.cpp
+++ b/mozilla/intl/uconv/tests/nsTestUConv.cpp
@@ -183,7 +183,7 @@ nsresult testDecoder(nsIUnicodeDecoder * aDec,
PRInt32 destLen = GENERAL_BUFFER/2;
// conversion
- res = aDec->Convert(dest, 0, &destLen, aSrc, 0, &srcLen);
+ res = aDec->Convert(aSrc, &srcLen, dest, &destLen);
// we want a perfect result here - the test data should be complete!
if (res != NS_OK) {
printf("ERROR at %s.easy.Decode() code=0x%x.\n",aTestName,res);
@@ -305,7 +305,7 @@ nsresult testStressDecoder(nsIUnicodeDecoder * aDec,
// controlled conversion
for (;srcOff < aSrcLength;) {
- res = aDec->Convert(dest, destOff, &destLen, aSrc, srcOff, &srcLen);
+ res = aDec->Convert(aSrc + srcOff, &srcLen, dest + destOff, &destLen);
if (NS_FAILED(res)) {
printf("ERROR at %s.stress.Convert() code=0x%x.\n",aTestName,res);
return res;
diff --git a/mozilla/intl/uconv/tests/nsconv.cpp b/mozilla/intl/uconv/tests/nsconv.cpp
index 2e3abec5d72..ecf2090b467 100644
--- a/mozilla/intl/uconv/tests/nsconv.cpp
+++ b/mozilla/intl/uconv/tests/nsconv.cpp
@@ -107,7 +107,7 @@ int main(int argc, const char** argv)
{
medsize=MEDBUFSIZE;
- res = decoder->Convert(medbuffer, 0, &medsize,inbuffer,0,&insize);
+ res = decoder->Convert(inbuffer,&insize, medbuffer, &medsize);
if(NS_FAILED(res)) {
fprintf(stderr, "failed in decoder->Convert %x\n",res);
return -1;
diff --git a/mozilla/mailnews/compose/src/nsMsgI18N.cpp b/mozilla/mailnews/compose/src/nsMsgI18N.cpp
index 0974b0d141d..301517dfece 100644
--- a/mozilla/mailnews/compose/src/nsMsgI18N.cpp
+++ b/mozilla/mailnews/compose/src/nsMsgI18N.cpp
@@ -120,7 +120,7 @@ nsresult ConvertToUnicode(const nsString& aCharset,
unichars = (PRUnichar *) PR_Malloc(unicharLength * sizeof(PRUnichar));
if (unichars != nsnull) {
// convert to unicode
- res = decoder->Convert(unichars, 0, &unicharLength, inCString, 0, &srcLen);
+ res = decoder->Convert(inCString, &srcLen, unichars, &unicharLength);
outString.SetString(unichars, unicharLength);
PR_Free(unichars);
}
diff --git a/mozilla/parser/htmlparser/src/nsScanner.cpp b/mozilla/parser/htmlparser/src/nsScanner.cpp
index 52c8dba59d0..a2bf6fc5175 100644
--- a/mozilla/parser/htmlparser/src/nsScanner.cpp
+++ b/mozilla/parser/htmlparser/src/nsScanner.cpp
@@ -255,7 +255,7 @@ PRBool nsScanner::Append(const char* aBuffer, PRUint32 aLen){
do {
PRInt32 srcLength = aLen;
PRInt32 unicharLength = unicharBufLen;
- res = mUnicodeDecoder->Convert(unichars, 0, &unicharLength,aBuffer, 0, &srcLength );
+ res = mUnicodeDecoder->Convert(aBuffer, &srcLength, unichars, &unicharLength);
unichars[unicharLength]=0; //add this since the unicode converters can't be trusted to do so.
diff --git a/mozilla/xpcom/io/nsUnicharInputStream.cpp b/mozilla/xpcom/io/nsUnicharInputStream.cpp
index 6edd8a12e6f..0ef1d7db37e 100644
--- a/mozilla/xpcom/io/nsUnicharInputStream.cpp
+++ b/mozilla/xpcom/io/nsUnicharInputStream.cpp
@@ -280,8 +280,8 @@ PRInt32 ConverterInputStream::Fill(nsresult * aErrorCode)
// Now convert as much of the byte buffer to unicode as possible
PRInt32 dstLen = mUnicharData->GetBufferSize();
PRInt32 srcLen = remainder + nb;
- *aErrorCode = mConverter->Convert(mUnicharData->GetBuffer(), 0, &dstLen,
- mByteData->GetBuffer(), 0, &srcLen);
+ *aErrorCode = mConverter->Convert(mByteData->GetBuffer(), &srcLen,
+ mUnicharData->GetBuffer(), &dstLen);
mUnicharDataOffset = 0;
mUnicharDataLength = dstLen;
mByteDataOffset += srcLen;