From: Michael Ow Date: Fri, 14 Jun 2013 21:10:26 +0000 (+0000) Subject: ICU-10214 Update locale subtag check in XLIFF2ICU converter tool X-Git-Tag: milestone-59-0-1~2831 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7322ddac17971c97a4c2f2e2af26d3d5649f110a;p=icu ICU-10214 Update locale subtag check in XLIFF2ICU converter tool X-SVN-Rev: 33831 --- diff --git a/icu4j/tools/misc/src/com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java b/icu4j/tools/misc/src/com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java index 34470226b4e..f17363b8c6d 100644 --- a/icu4j/tools/misc/src/com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java +++ b/icu4j/tools/misc/src/com/ibm/icu/dev/tool/localeconverter/XLIFF2ICUConverter.java @@ -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 element does not satisfy RFC 1766 conditions."); + "\" of element is invalid."); System.exit(-1); } return name;