rv = ccm2->GetCharsetAtom(m_sysCharset.GetUnicode(), getter_AddRefs(charsetAtom));
rv = ccm2->GetCharsetAtom(m_sysCharset.get(), getter_AddRefs(charsetAtom));
NS_IMETHODIMP nsImportService::SystemStringToUnicode(const char *sysStr, nsString & uniStr){  	nsresult	rv;	if (m_sysCharset.IsEmpty()) {		nsCOMPtr <nsIPlatformCharset> platformCharset = do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv);		if (NS_SUCCEEDED(rv)) 			rv = platformCharset->GetCharset(kPlatformCharsetSel_FileName, m_sysCharset);		if (NS_FAILED(rv)) 			m_sysCharset.AssignWithConversion("ISO-8859-1");	}	if (!sysStr) {		uniStr.Truncate();		return( NS_OK);	}  	if (*sysStr == '\0') {		uniStr.Truncate();		return( NS_OK);	}		if (m_sysCharset.IsEmpty() ||		m_sysCharset.EqualsIgnoreCase("us-ascii") ||		m_sysCharset.EqualsIgnoreCase("ISO-8859-1")) {		uniStr.AssignWithConversion( sysStr);		return( NS_OK);	}			if (!m_pDecoder) {		nsCOMPtr<nsICharsetConverterManager2> ccm2 = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);		if (NS_SUCCEEDED( rv) && (nsnull != ccm2)) {			// get charset atom due to getting unicode converter			nsCOMPtr <nsIAtom> charsetAtom;			rv = ccm2->GetCharsetAtom(m_sysCharset.GetUnicode(), getter_AddRefs(charsetAtom));			// get an unicode converter			rv = ccm2->GetUnicodeDecoder(charsetAtom, &m_pDecoder);		}	    	}	if (m_pDecoder) {		PRInt32		srcLen = PL_strlen( sysStr);		PRUnichar *	unichars;		PRInt32 unicharLength = 0;		rv = m_pDecoder->GetMaxLength( sysStr, srcLen, &unicharLength);		// allocale an output buffer		unichars = (PRUnichar *) PR_Malloc(unicharLength * sizeof(PRUnichar));		if (unichars != nsnull) {			// convert to unicode			rv = m_pDecoder->Convert( sysStr, &srcLen, unichars, &unicharLength);			uniStr.Assign(unichars, unicharLength);			PR_Free(unichars);		}		else			rv = NS_ERROR_OUT_OF_MEMORY;	}		if (NS_FAILED( rv))		uniStr.AssignWithConversion( sysStr);	return( rv);}