// keys are using ASCII alphabetic letters only. We won't add any new key
// that is not compatible with the BCP 47 syntax. Therefore, we assume
// a valid key consist from [0-9a-zA-Z], no symbols.
- if (keyword.matches("[0-9a-zA-Z]*")) {
+ if (keyword.matches("[0-9a-zA-Z]+")) {
legacyKey = AsciiUtil.toLowerString(keyword);
}
}
{"variableTop", "00A0", "00a0"}, // valid codepoints type
{"variableTop", "wxyz", "wxyz"}, // invalid codepoints type - return as is for now
{"kr", "space-punct", "space-punct"}, // valid reordercode type
- {"kr", "digit-spacepunct", "digit-spacepunct"}, // invalid reordercode type, bad ok for legacy syntax
+ {"kr", "digit-spacepunct", "digit-spacepunct"}, // invalid reordercode type, but ok for legacy syntax
};
for (String[] d : DATA) {