mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-4239 return proper warning from ucurr_getName
X-SVN-Rev: 17766
This commit is contained in:
parent
3c23de14f0
commit
95d413e0c0
1 changed files with 5 additions and 0 deletions
|
@ -490,6 +490,10 @@ ucurr_getName(const UChar* currency,
|
|||
// If that fails (because we are already at root) then exit.
|
||||
if (U_SUCCESS(ec2) || !fallback(loc)) {
|
||||
break;
|
||||
} else if (strlen(loc) == 0) {
|
||||
*ec = U_USING_DEFAULT_WARNING;
|
||||
} else if (*ec != U_USING_DEFAULT_WARNING) {
|
||||
*ec = U_USING_FALLBACK_WARNING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -512,6 +516,7 @@ ucurr_getName(const UChar* currency,
|
|||
|
||||
// If we fail to find a match, use the ISO 4217 code
|
||||
*len = u_strlen(currency); // Should == ISO_COUNTRY_CODE_LENGTH, but maybe not...?
|
||||
*ec = U_USING_DEFAULT_WARNING;
|
||||
return currency;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue