if (!PL_strcasecmp(from_charset, to_charset))
if (!nsCRT::strcasecmp(from_charset, to_charset))
static PRInt32 INTL_ConvertCharset(const char* from_charset, const char* to_charset,                                   const char* inBuffer, const PRInt32 inLength,                                   char** outBuffer, PRInt32* outLength){  char *dstPtr = nsnull;  PRInt32 dstLength = 0;  nsresult res;  // invalid input  if (nsnull == from_charset || nsnull == to_charset ||       '\0' == *from_charset || '\0' == *to_charset || nsnull == inBuffer)     return -1;  // from to identical  if (!PL_strcasecmp(from_charset, to_charset))    return -1;  // us-ascii is a subset of utf-8  if ((!PL_strcasecmp(from_charset, "us-ascii") && !PL_strcasecmp(to_charset, "utf-8")) ||      (!PL_strcasecmp(from_charset, "utf-8") && !PL_strcasecmp(to_charset, "us-ascii")))    return -1;  NS_WITH_SERVICE(nsICharsetConverterManager, ccm, kCharsetConverterManagerCID, &res);   if(NS_SUCCEEDED(res) && (nsnull != ccm)) {    nsString aCharset(from_charset);    nsIUnicodeDecoder* decoder = nsnull;    PRUnichar *unichars;    PRInt32 unicharLength;    // convert to unicode    res = ccm->GetUnicodeDecoder(&aCharset, &decoder);    if(NS_SUCCEEDED(res) && (nsnull != decoder)) {      PRInt32 srcLen = inLength;      res = decoder->GetMaxLength(inBuffer, srcLen, &unicharLength);      // temporary buffer to hold unicode string      unichars = new PRUnichar[unicharLength];      if (unichars == nsnull) {        res = NS_ERROR_OUT_OF_MEMORY;      }      else {        res = decoder->Convert(inBuffer, &srcLen, unichars, &unicharLength);        // convert from unicode        nsIUnicodeEncoder* encoder = nsnull;        aCharset.SetString(to_charset);        res = ccm->GetUnicodeEncoder(&aCharset, &encoder);        if(NS_SUCCEEDED(res) && (nsnull != encoder)) {          res = encoder->GetMaxLength(unichars, unicharLength, &dstLength);          // allocale an output buffer          dstPtr = (char *) PR_Malloc(dstLength + 1);          if (dstPtr == nsnull) {            res = NS_ERROR_OUT_OF_MEMORY;          }          else {            res = encoder->Convert(unichars, &unicharLength, dstPtr, &dstLength);          }          NS_IF_RELEASE(encoder);        }        delete [] unichars;      }      NS_IF_RELEASE(decoder);    }  }  // set the outputs  if (NS_SUCCEEDED(res) && nsnull != dstPtr) {    dstPtr[dstLength] = '\0';    *outBuffer = dstPtr;    *outLength = dstLength;  }  return NS_SUCCEEDED(res) ? 0 : -1;}