ICU-21326 Changed res_findResource() so that it doesn't try index-based lookup in a table resource if the resource ID has a leading zero
diff --git a/icu4c/source/common/uresdata.cpp b/icu4c/source/common/uresdata.cpp
index b3c2e2e..ae731e4 100644
--- a/icu4c/source/common/uresdata.cpp
+++ b/icu4c/source/common/uresdata.cpp
@@ -963,7 +963,7 @@
       if(t2 == RES_BOGUS) { 
         /* if we fail to get the resource by key, maybe we got an index */
         indexR = uprv_strtol(pathP, &closeIndex, 10);
-        if(indexR >= 0 && *closeIndex == 0) {
+        if(indexR >= 0 && *closeIndex == 0 && (*pathP != '0' || closeIndex - pathP == 1)) {
           /* if we indeed have an index, try to get the item by index */
           t2 = res_getTableItemByIndex(pResData, t1, indexR, key);
         } // else t2 is already RES_BOGUS
diff --git a/icu4c/source/test/intltest/locnmtst.cpp b/icu4c/source/test/intltest/locnmtst.cpp
index 8e86f2f..61baca2 100644
--- a/icu4c/source/test/intltest/locnmtst.cpp
+++ b/icu4c/source/test/intltest/locnmtst.cpp
@@ -82,6 +82,7 @@
         TESTCASE(12, TestUldnDisplayContext);
         TESTCASE(13, TestUldnWithGarbage);
         TESTCASE(14, TestSubstituteHandling);
+        TESTCASE(15, TestNumericRegionID);
 #endif
         default:
             name = "";
@@ -420,6 +421,23 @@
   delete ldn;
 }
 
+void LocaleDisplayNamesTest::TestNumericRegionID() {
+    UErrorCode err = U_ZERO_ERROR;
+    ULocaleDisplayNames* ldn = uldn_open("es_MX", ULDN_STANDARD_NAMES, &err);
+    UChar displayName[200];
+    int32_t displayNameLength = uldn_regionDisplayName(ldn, "019", displayName, 200, &err);
+    test_assert(U_SUCCESS(err));
+    test_assert_equal(UnicodeString(u"América"), UnicodeString(displayName));
+    uldn_close(ldn);    
+
+    err = U_ZERO_ERROR; // reset in case the test above returned an error code
+    ldn = uldn_open("en_AU", ULDN_STANDARD_NAMES, &err);
+    displayNameLength = uldn_regionDisplayName(ldn, "002", displayName, 200, &err);
+    test_assert(U_SUCCESS(err));
+    test_assert_equal(UnicodeString(u"Africa"), UnicodeString(displayName));
+    uldn_close(ldn);    
+}
+
 static const char unknown_region[] = "wx";
 static const char unknown_lang[] = "xy";
 static const char unknown_script[] = "wxyz";
diff --git a/icu4c/source/test/intltest/locnmtst.h b/icu4c/source/test/intltest/locnmtst.h
index ad0af46..e09a7d3 100644
--- a/icu4c/source/test/intltest/locnmtst.h
+++ b/icu4c/source/test/intltest/locnmtst.h
@@ -38,6 +38,7 @@
     void TestUldnDisplayContext(void);
     void TestUldnWithGarbage(void);
     void TestSubstituteHandling(void);
+    void TestNumericRegionID(void);
 
     void VerifySubstitute(LocaleDisplayNames* ldn);
     void VerifyNoSubstitute(LocaleDisplayNames* ldn);