#148026 We should return error when default locale is used for unix platform charset

Replace error return code by success return code for unix platform charset getter.
r=bryner, sr=darin
This commit is contained in:
shanjian%netscape.com 2002-05-30 03:23:38 +00:00
parent 78e0e6a53e
commit 0d8cf68441
2 changed files with 6 additions and 6 deletions

View File

@ -65,8 +65,8 @@
#define NS_ERROR_UCONV_NOCONV \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x01)
#define NS_ERROR_USING_FALLBACK_LOCALE \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x02)
#define NS_SUCCESS_USING_FALLBACK_LOCALE \
NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 0x02)
#ifdef DEBUG
#define REGSELF_PRINTF(x,y) \

View File

@ -125,7 +125,7 @@ nsPlatformCharset::ConvertLocaleToCharsetUsingDeprecatedConfig(nsAutoString& loc
}
NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
mCharset.Assign(NS_LITERAL_STRING("ISO-8859-1"));
return NS_ERROR_USING_FALLBACK_LOCALE;
return NS_SUCCESS_USING_FALLBACK_LOCALE;
}
nsPlatformCharset::~nsPlatformCharset()
@ -179,7 +179,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUni
NS_ASSERTION(0, "GetDefaultCharsetForLocale: need to add multi locale support");
// until we add multi locale support: use the the charset of the user's locale
*_retValue = ToNewUnicode(mCharset);
return NS_ERROR_USING_FALLBACK_LOCALE;
return NS_SUCCESS_USING_FALLBACK_LOCALE;
#endif
//
@ -197,7 +197,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const PRUnichar* localeName, PRUni
NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
charset.Assign(NS_LITERAL_STRING("ISO-8859-1"));
*_retValue = ToNewUnicode(charset);
return NS_ERROR_USING_FALLBACK_LOCALE;
return NS_SUCCESS_USING_FALLBACK_LOCALE;
}
nsresult
@ -335,7 +335,7 @@ nsPlatformCharset::Init()
// last resort fallback
NS_ASSERTION(0, "unable to convert locale to charset using deprecated config");
mCharset.Assign(NS_LITERAL_STRING("ISO-8859-1"));
return NS_ERROR_USING_FALLBACK_LOCALE;
return NS_SUCCESS_USING_FALLBACK_LOCALE;
}
nsresult