convertedString = unicodeStr.ToNewUnicode();
convertedString = ToNewUnicode(unicodeStr);
nsresult CreateUnicodeStringFromUtf7(const char *aSourceString, PRUnichar **aUnicodeStr){  if (!aUnicodeStr)	  return NS_ERROR_NULL_POINTER;  PRUnichar *convertedString = NULL;  nsresult res;  nsCOMPtr<nsICharsetConverterManager> ccm =            do_GetService(kCharsetConverterManagerCID, &res);   if(NS_SUCCEEDED(res) && (nsnull != ccm))  {    nsString aCharset; aCharset.AssignWithConversion("x-imap4-modified-utf7");    PRUnichar *unichars = nsnull;    PRInt32 unicharLength;    // convert utf7 to unicode    nsIUnicodeDecoder* decoder = nsnull;    res = ccm->GetUnicodeDecoder(&aCharset, &decoder);    if(NS_SUCCEEDED(res) && (nsnull != decoder))     {      PRInt32 srcLen = PL_strlen(aSourceString);      res = decoder->GetMaxLength(aSourceString, srcLen, &unicharLength);      // temporary buffer to hold unicode string      unichars = new PRUnichar[unicharLength + 1];      if (unichars == nsnull)       {        res = NS_ERROR_OUT_OF_MEMORY;      }      else       {        res = decoder->Convert(aSourceString, &srcLen, unichars, &unicharLength);        unichars[unicharLength] = 0;      }      NS_IF_RELEASE(decoder);      nsString unicodeStr(unichars);      convertedString = unicodeStr.ToNewUnicode();	  delete [] unichars;    }  }  *aUnicodeStr = convertedString;  return (convertedString) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;}