Home
last modified time | relevance | path

Searched refs:subtag (Results 1 – 25 of 43) sorted by relevance

12

/external/icu/android_icu4j/src/main/java/android/icu/impl/locale/
DLocaleValidityChecker.java163 for (String subtag : SEPARATOR.split(extensionString)) { in isValidU()
164 if (subtag.length() == 2 in isValidU()
165 && (tBuffer == null || subtag.charAt(1) <= '9')) { in isValidU()
174 key = KeyTypeData.toBcpKey(subtag); in isValidU()
176 return where.set(datatype, subtag); in isValidU()
188 tBuffer.append(subtag); in isValidU()
194 return where.set(datatype, key+"-"+subtag); in isValidU()
200 prefix.append(subtag); in isValidU()
202 prefix.append('-').append(subtag); in isValidU()
203 subtag = prefix.toString(); in isValidU()
[all …]
DUnicodeLocaleExtension.java116 String subtag = idx < 0 ? s.substring(startIdx) : s.substring(startIdx, idx); in isType()
117 if (!isTypeSubtag(subtag)) { in isType()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/locale/
DLocaleValidityChecker.java158 for (String subtag : SEPARATOR.split(extensionString)) { in isValidU()
159 if (subtag.length() == 2 in isValidU()
160 && (tBuffer == null || subtag.charAt(1) <= '9')) { in isValidU()
169 key = KeyTypeData.toBcpKey(subtag); in isValidU()
171 return where.set(datatype, subtag); in isValidU()
183 tBuffer.append(subtag); in isValidU()
189 return where.set(datatype, key+"-"+subtag); in isValidU()
195 prefix.append(subtag); in isValidU()
197 prefix.append('-').append(subtag); in isValidU()
198 subtag = prefix.toString(); in isValidU()
[all …]
DUnicodeLocaleExtension.java112 String subtag = idx < 0 ? s.substring(startIdx) : s.substring(startIdx, idx); in isType()
113 if (!isTypeSubtag(subtag)) { in isType()
/external/elfutils/tests/
Drun-unit-info.sh51 0 cu dietag: 11, subtag: 11, version 4, unit_type 4
52 0 subdietag: 11, subtag: 0, version 4, unit_type 5
53 1 cu dietag: 11, subtag: 11, version 4, unit_type 4
54 1 subdietag: 11, subtag: 0, version 4, unit_type 5
57 0 re dietag: 11, subtag: 11, version 4, unit_type 4
58 0 subdietag: 11, subtag: 0, version 4, unit_type 5
59 1 re dietag: 11, subtag: 11, version 4, unit_type 4
60 1 subdietag: 11, subtag: 0, version 4, unit_type 5
64 0 cu dietag: 4a, subtag: 11, version 5, unit_type 4
65 0 subdietag: 11, subtag: 0, version 5, unit_type 5
[all …]
Dunit-info.c36 int subtag; member
70 int subtag = dwarf_tag (&subdie); in main() local
73 unit_info[u].subtag = subtag; in main()
79 u, dietag, subtag, version, unit_type); in main()
92 subtag = dwarf_tag (&subdie); in main()
100 if (unit_info[u].subtag != subtag) in main()
134 subtag = dwarf_tag (&subdie); in main()
138 u, dietag, subtag, version, unit_type); in main()
141 if (unit_info[u].subtag != dietag) in main()
209 int subtag = dwarf_tag (&subdie); in main() local
[all …]
/external/cldr/tools/java/org/unicode/cldr/util/
DUExtension.java63 for (String subtag : SEP.split(source)) { in parse()
64 if (!alphanum.reset(subtag).matches()) { in parse()
65 …row new IllegalArgumentException("Invalid subtag contents, must be [0-9 A-Z a-z]{2,8}: " + subtag); in parse()
67 subtag = subtag.toLowerCase(Locale.ENGLISH); // normalize in parse()
68 if (subtag.length() == 2) { // key in parse()
74 key = subtag; in parse()
83 throw new IllegalArgumentException("Multiple keys with same value: " + subtag); in parse()
90 … throw new IllegalArgumentException("No attributes currently valid: " + subtag); in parse()
92 attributes.add(subtag); in parse()
97 if (!CODEPOINTS.matcher(subtag).matches()) { in parse()
[all …]
DLanguageTagParser.java257 String subtag; in set() local
259 subtag = getSubtag(st); in set()
265 if (subtag.equalsIgnoreCase("x")) { in set()
266 getExtension(subtag, st, 1); in set()
271 if (!ALPHA.containsAll(subtag) || subtag.length() < 2) { in set()
272 throwError(subtag, "Invalid language subtag"); in set()
275 language = subtag; in set()
276 subtag = getSubtag(st); // prepare for next in set()
279 if (subtag.length() == 4 && ALPHA.containsAll(subtag)) { in set()
280 script = subtag; in set()
[all …]
/external/harfbuzz_ng/src/
Dgen-tag-table.py546 subtag = None
561 subtag = line.split (' ')[1]
563 self.grandfathered.add (subtag.lower ())
568 if subtag in self.names:
569 self.names[subtag] += '\n' + description
571 self.names[subtag] = description
581 self.scopes[subtag] = scope
583 self.scopes[subtag] = ' (retired code)' + self.scopes.get (subtag, '')
589 self._add_macrolanguage (subtag, language)
597 self._add_macrolanguage (macrolanguage, subtag)
[all …]
Dhb-ot-tag.cc183 const char *subtag) in subtag_matches() argument
186 const char *s = strstr (lang_str, subtag); in subtag_matches()
189 if (!ISALNUM (s[strlen (subtag)])) in subtag_matches()
191 lang_str = s + strlen (subtag); in subtag_matches()
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/
DTestLsrvCanonicalizer.java188 String subtag = entry2.getKey(); in TestAgainstLanguageSubtagRegistry() local
196 final String subtagCompat = subtag.replace('-', '_'); in TestAgainstLanguageSubtagRegistry()
199 if (SKIP.contains(subtag)) { in TestAgainstLanguageSubtagRegistry()
211 shouldSkip.add(subtag); in TestAgainstLanguageSubtagRegistry()
219 String exception = exceptions.get(subtag); in TestAgainstLanguageSubtagRegistry()
224 String typeName = english.getName(typeCompat, subtag); in TestAgainstLanguageSubtagRegistry()
226 …addExceptions.add(".put(\"" + subtag + "\", \"" + replacementString + "\")" + " // " + typeName + … in TestAgainstLanguageSubtagRegistry()
DTestInheritance.java865 String subtag, boolean allowDeprecated) { in checkValidCode()
867 if (subtag.equals("und")) { in checkValidCode()
871 if (subtag.isEmpty()) { in checkValidCode()
875 if (!STANDARD_CODES.getAvailableCodes(subtagType).contains(subtag)) { in checkValidCode()
876 errln("Locale " + localeID + " contains illegal " + showCode(subtagType, subtag)); in checkValidCode()
880 subtagType).get(subtag); in checkValidCode()
883 + showCode(subtagType, subtag) + " " in checkValidCode()
898 private String showCode(String subtagType, String subtag) { in showCode() argument
899 return subtagType + " code: " + showName(subtagType, subtag); in showCode()
902 private String showName(String subtagType, String subtag) { in showName() argument
[all …]
DTestUnits.java1351 for (String subtag : identifier.split("-")) { in checkBcp47()
1352 … + " identifier=" + identifier + " subtag=" + subtag + " has right characters", allowed.containsAl… in checkBcp47()
1353 if (!(subtag.length() >= MIN_SUBTAG_LENGTH && subtag.length() <= MAX_SUBTAG_LENGTH)) { in checkBcp47()
1356 if (subtag.startsWith(prefix)) { in checkBcp47()
1357 subtag = subtag.substring(prefix.length()); in checkBcp47()
1365 if (subtag.length() > MAX_SUBTAG_LENGTH) { in checkBcp47()
1366 shortIdentifer.append(subtag.substring(0, MAX_SUBTAG_LENGTH)); in checkBcp47()
1369 shortIdentifer.append(subtag); in checkBcp47()
/external/icu/icu4c/source/i18n/
Drulebasedcollator.cpp1514 void appendSubtag(CharString &s, char letter, const char *subtag, int32_t length, in appendSubtag() argument
1522 s.append(uprv_toupper(subtag[i]), errorCode); in appendSubtag()
1561 char subtag[ULOC_KEYWORD_AND_VALUES_CAPACITY]; in internalGetShortDefinitionString() local
1581 …length = uloc_getKeywordValue(resultLocale, "collation", subtag, UPRV_LENGTHOF(subtag), &errorCode… in internalGetShortDefinitionString()
1582 appendSubtag(result, 'K', subtag, length, errorCode); in internalGetShortDefinitionString()
1583 length = uloc_getLanguage(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1587 appendSubtag(result, 'L', subtag, length, errorCode); in internalGetShortDefinitionString()
1592 length = uloc_getCountry(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
1593 appendSubtag(result, 'R', subtag, length, errorCode); in internalGetShortDefinitionString()
1597 length = uloc_getVariant(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); in internalGetShortDefinitionString()
[all …]
/external/icu/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/localedistance/
DDistanceTable.java442 for (String subtag : subtagPairs) { in fromSubtags()
443 keyPairs.add(fixAny(subtag)); in fromSubtags()
450 private static String fixAny(String subtag) { in fixAny() argument
451 return subtag.equals("*") ? ANY : subtag; in fixAny()
DLocaleDistanceMapper.java476 private static boolean isAny(String subtag) { in isAny() argument
477 return subtag.equals("*"); in isAny()
481 private static boolean isAny(Optional<String> subtag) { in isAny() argument
482 return subtag.map(LocaleDistanceMapper::isAny).orElse(false); in isAny()
DLikelySubtagsBuilder.java323 … private static <T> Map<String, T> getSubtable(Map<String, Map<String, T>> table, String subtag) { in getSubtable() argument
324 return table.computeIfAbsent(subtag, k -> new TreeMap<>(SUBTABLE_ORDER)); in getSubtable()
/external/cldr/docs/rfc/
Ddraft-davis-t-langtag-ext.txt207 the primary language subtag.
233 singleton (a single-character subtag), because that would start a new
250 fields, where each field consists of a field separator subtag
252 subtag consists of a single letter followed by a single digit.
272 short, visually distinctive, and cannot occur in a language subtag
359 a. The 't' extension MUST have at least one subtag.
376 e. The 't' subtag fields are defined by Section 3 [1] of Unicode
428 o The allocation of subtags valid after a field separator subtag.
430 o The addition of subtag aliases and descriptions.
432 o The modification of subtag descriptions.
[all …]
Ddraft-davis-u-langtag-ext-00.txt190 o An 'attribute' is a subtag with a length of three or more
195 o A 'keyword' is a sequence of subtags consisting of a 'key' subtag,
200 'type' subtag.
202 A. A 'key' is a subtag with a length of exactly two characters.
205 B. A 'type' is a subtag with a length of three or more characters
/external/icu/icu4c/source/tools/genrb/
Dparse.cpp821 char subtag[1024]; in addCollation() local
857 u_UCharsToChars(tokenValue->fChars, subtag, u_strlen(tokenValue->fChars) + 1); in addCollation()
865 member = parseResource(state, subtag, NULL, status); in addCollation()
876 else if (uprv_strcmp(subtag, "Version") == 0 && member->isString()) in addCollation()
893 else if(uprv_strcmp(subtag, "%%CollationBin")==0) in addCollation()
897 else if (uprv_strcmp(subtag, "Sequence") == 0 && member->isString()) in addCollation()
1054 char subtag[1024], typeKeyword[1024]; in parseCollationElements() local
1096 u_UCharsToChars(tokenValue->fChars, subtag, u_strlen(tokenValue->fChars) + 1); in parseCollationElements()
1104 if (uprv_strcmp(subtag, "default") == 0) in parseCollationElements()
1106 member = parseResource(state, subtag, NULL, status); in parseCollationElements()
[all …]
/external/icu/icu4c/source/common/
Duloc_tag.cpp2761 const char *subtag, *p; in ulocimp_forLanguageTag() local
2772subtag = ultag_getExtlangSize(lt.getAlias()) > 0 ? ultag_getExtlang(lt.getAlias(), 0) : ultag_getL… in ulocimp_forLanguageTag()
2773 if (uprv_compareInvCharsAsAscii(subtag, LANG_UND) != 0) { in ulocimp_forLanguageTag()
2774 len = (int32_t)uprv_strlen(subtag); in ulocimp_forLanguageTag()
2776 sink.Append(subtag, len); in ulocimp_forLanguageTag()
2782 subtag = ultag_getScript(lt.getAlias()); in ulocimp_forLanguageTag()
2783 len = (int32_t)uprv_strlen(subtag); in ulocimp_forLanguageTag()
2789 char c = uprv_toupper(*subtag); in ulocimp_forLanguageTag()
2791 sink.Append(subtag + 1, len - 1); in ulocimp_forLanguageTag()
2795 subtag = ultag_getRegion(lt.getAlias()); in ulocimp_forLanguageTag()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/tool/locale/
DLikelySubtagsBuilder.java313 private static <K, V, T> Map<V, T> getSubtable(Map<K, Map<V, T>> table, final K subtag) {
314 Map<V, T> subTable = table.get(subtag);
316 table.put(subtag, subTable = new TreeMap<>());
/external/icu/icu4j/tools/misc/src/com/ibm/icu/dev/tool/locale/
DLikelySubtagsBuilder.java310 private static <K, V, T> Map<V, T> getSubtable(Map<K, Map<V, T>> table, final K subtag) {
311 Map<V, T> subTable = table.get(subtag);
313 table.put(subtag, subTable = new TreeMap<>());
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DULocale.java3441 String subtag = tag.getLanguage(); in toLanguageTag() local
3442 if (subtag.length() > 0) { in toLanguageTag()
3443 buf.append(LanguageTag.canonicalizeLanguage(subtag)); in toLanguageTag()
3446 subtag = tag.getScript(); in toLanguageTag()
3447 if (subtag.length() > 0) { in toLanguageTag()
3449 buf.append(LanguageTag.canonicalizeScript(subtag)); in toLanguageTag()
3452 subtag = tag.getRegion(); in toLanguageTag()
3453 if (subtag.length() > 0) { in toLanguageTag()
3455 buf.append(LanguageTag.canonicalizeRegion(subtag)); in toLanguageTag()
3473 subtag = tag.getPrivateuse(); in toLanguageTag()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/util/
DULocale.java3281 String subtag = tag.getLanguage(); in toLanguageTag() local
3282 if (subtag.length() > 0) { in toLanguageTag()
3283 buf.append(LanguageTag.canonicalizeLanguage(subtag)); in toLanguageTag()
3286 subtag = tag.getScript(); in toLanguageTag()
3287 if (subtag.length() > 0) { in toLanguageTag()
3289 buf.append(LanguageTag.canonicalizeScript(subtag)); in toLanguageTag()
3292 subtag = tag.getRegion(); in toLanguageTag()
3293 if (subtag.length() > 0) { in toLanguageTag()
3295 buf.append(LanguageTag.canonicalizeRegion(subtag)); in toLanguageTag()
3313 subtag = tag.getPrivateuse(); in toLanguageTag()
[all …]

12