From 19d7b4d7092529e253c351fcad7bda08e2237df8 Mon Sep 17 00:00:00 2001 From: Debabrata Sengupta Date: Thu, 21 Jun 2012 19:52:29 +0000 Subject: [PATCH] ICU-8971 fixed inconsistency bug between C and J for parsing and canonicalization X-SVN-Rev: 31975 --- icu4c/source/common/uloc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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