ICU-8971 fixed inconsistency bug between C and J for parsing and canonicalization

X-SVN-Rev: 31975
This commit is contained in:
Debabrata Sengupta 2012-06-21 19:52:29 +00:00
parent 02a1c5ab50
commit 19d7b4d709

View file

@ -1701,7 +1701,7 @@ _canonicalize(const char* localeID,
}
if(_isIDSeparator(*tmpLocaleID)) {
/* If there is something else, then we add the _ if we found country before.*/
if (cntrySize > 0) {
if (cntrySize >= 0 && ! _isIDSeparator(*(tmpLocaleID+1)) ) {
++fieldCount;
if(len<nameCapacity) {
name[len]='_';