ICU-408 HPUX returns 'C C C C C C' as the default locale, map to en_US like 'C'

X-SVN-Rev: 1518
This commit is contained in:
Steven R. Loomis 2000-05-30 20:43:37 +00:00
parent 7db082375a
commit 561deb6ee6

View File

@ -1255,7 +1255,11 @@ uprv_getDefaultLocaleID()
const char* posixID = getenv("LC_ALL");
if (posixID == 0) posixID = getenv("LANG");
if (posixID == 0) posixID = setlocale(LC_ALL, NULL);
if (uprv_strcmp("C", posixID) == 0) posixID = "en_US";
if ( (uprv_strcmp("C", posixID) == 0) ||
(uprv_strncmp("C ", posixID, 2) == 0) ) { /* HPUX returns 'C C C C C C C' */
posixID = "en_US";
}
return posixID;
#endif