result = locale->GetCategory(category->GetUnicode(),&lc_name_unichar);
result = locale->GetCategory(category->get(),&lc_name_unichar);
factory_get_locale(void){	nsresult			result;	nsILocaleFactory*	localeFactory;	nsILocale*			locale;	nsString*			category;	nsString*			value;	const char*			acceptLangString = "ja;q=0.9,en;q=1.0,*";	PRUnichar *lc_name_unichar;	result = nsComponentManager::FindFactory(kLocaleFactoryCID,										(nsIFactory**)&localeFactory);	NS_ASSERTION(localeFactory!=NULL,"nsLocaleTest: factory_create_interface failed.");	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_create_interface failed");	//	// get the application locale	//	result = localeFactory->GetApplicationLocale(&locale);	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");	NS_ASSERTION(locale!=NULL,"nsLocaleTest: factory_get_locale failed");	//	// test and make sure the locale is a valid Interface	//	locale->AddRef();	category = new nsString("NSILOCALE_CTYPE");	value = new nsString();	result = locale->GetCategory(category->GetUnicode(),&lc_name_unichar);	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");  value->SetString(lc_name_unichar);	locale->Release();	locale->Release();	delete category;	delete value;	//	// test GetSystemLocale	//	result = localeFactory->GetSystemLocale(&locale);	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");	NS_ASSERTION(locale!=NULL,"nsLocaleTest: factory_get_locale failed");	//	// test and make sure the locale is a valid Interface	//	locale->AddRef();	category = new nsString("NSILOCALE_CTYPE");	value = new nsString();	result = locale->GetCategory(category->GetUnicode(),&lc_name_unichar);	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");  value->SetString(lc_name_unichar);	locale->Release();	locale->Release();	delete category;	delete value;	//	// test GetLocaleFromAcceptLanguage	//	result = localeFactory->GetLocaleFromAcceptLanguage(acceptLangString,&locale);	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");	NS_ASSERTION(locale!=NULL,"nsLocaleTest: factory_get_locale failed");	//	// test and make sure the locale is a valid Interface	//	locale->AddRef();	category = new nsString("NSILOCALE_CTYPE");	value = new nsString();	result = locale->GetCategory(category->GetUnicode(),&lc_name_unichar);	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");  value->SetString(lc_name_unichar);	locale->Release();	locale->Release();	delete category;	delete value;	localeFactory->Release();}