delete [] charset_properties;
nsWinCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUnichar** _retValue){	nsCOMPtr<nsIWin32Locale>	winLocale;	LCID						localeAsLCID;	char						acp_name[6];	nsString					charset("windows-1252");	nsString					localeAsNSString(localeName);	//	// convert locale name to a code page (through the LCID)	//	nsresult result = nsComponentManager::CreateInstance(kWin32LocaleFactoryCID,nsnull,kIWin32LocaleIID,												getter_AddRefs(winLocale));	result = winLocale->GetPlatformLocale(&localeAsNSString,&localeAsLCID);	if (NS_FAILED(result)) { *_retValue = charset.ToNewUnicode(); return result; }	if (GetLocaleInfo(localeAsLCID,LOCALE_IDEFAULTANSICODEPAGE,acp_name,sizeof(acp_name))==0) { *_retValue = charset.ToNewUnicode(); return NS_ERROR_FAILURE; }	//	// load property file and convert from LCID->charset	//	// XXX - this should be cached for the lifetime of the component, nicht wahr?	nsAutoString property_url("resource:/res/wincharset.properties");	nsURLProperties *charset_properties = new nsURLProperties(property_url);	if (!charset_properties) { *_retValue = charset.ToNewUnicode(); return NS_ERROR_OUT_OF_MEMORY; }     nsAutoString acp_key("acp.");	 acp_key.Append(acp_name);	 result = charset_properties->Get(acp_key,charset);		 delete [] charset_properties;		 *_retValue = charset.ToNewUnicode();	 return result;}