From: Debabrata Sengupta Date: Thu, 21 Jun 2012 19:52:29 +0000 (+0000) Subject: ICU-8971 fixed inconsistency bug between C and J for parsing and canonicalization X-Git-Tag: milestone-59-0-1~3750 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19d7b4d7092529e253c351fcad7bda08e2237df8;p=icu ICU-8971 fixed inconsistency bug between C and J for parsing and canonicalization X-SVN-Rev: 31975 --- diff --git a/icu4c/source/common/uloc.cpp b/icu4c/source/common/uloc.cpp index 42678feb48e..557bbf4b22d 100644 --- a/icu4c/source/common/uloc.cpp +++ b/icu4c/source/common/uloc.cpp @@ -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