]> granicus.if.org Git - icu/commitdiff
ICU-10214 Update locale subtag check in XLIFF2ICU converter tool
authorMichael Ow <mow@svn.icu-project.org>
Fri, 14 Jun 2013 21:10:26 +0000 (21:10 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Fri, 14 Jun 2013 21:10:26 +0000 (21:10 +0000)
X-SVN-Rev: 33831

icu4j/tools/misc/src/com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java

index 34470226b4ee7dcbbb48f1884b610403b4a3c199..f17363b8c6db07bc245c7593d593016c0f128ae3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  ******************************************************************************
- * Copyright (C) 2003-2010, International Business Machines Corporation and   *
+ * Copyright (C) 2003-2013, International Business Machines Corporation and   *
  * others. All Rights Reserved.                                               *
  ******************************************************************************
  */
@@ -358,7 +358,7 @@ public final class XLIFF2ICUConverter {
             }
             while (++suffix < lang.length ()) {
                 c = lang.charAt(suffix);
-                if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))){
+                if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'))){
                     break;
                 }
             }
@@ -560,7 +560,7 @@ public final class XLIFF2ICUConverter {
                 }
                 if(!isXmlLang(name)){
                     System.err.println("The attribute "+ lang + "=\""+ name +
-                                       "\" of <file> element does not satisfy RFC 1766 conditions.");
+                                       "\" of <file> element is invalid.");
                     System.exit(-1);
                 }
                 return name;