Skip to content

Commit a071426

Browse files
committed
Handle the ambiguous delimiter in kEH_FVal
1 parent 73a2410 commit a071426

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

unicodetools/src/main/java/org/unicode/props/PropertyParsingInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ public void setMultiValued(String multivalued2) {
538538
if (property == UcdProperty.Name_Alias || property == UcdProperty.Standardized_Variant) {
539539
multivaluedSplit = NO_SPLIT;
540540
}
541+
if (property == UcdProperty.kEH_FVal) {
542+
multivaluedSplit = Pattern.compile(" [\\|/] ");
543+
}
541544
if (multivalued2.endsWith("_COMMA")) {
542545
multivaluedSplit = COMMA;
543546
multivalued = ValueCardinality.Unordered;

unicodetools/src/main/java/org/unicode/props/UcdProperty.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,12 @@ public enum UcdProperty {
217217
kEACC(PropertyType.Miscellaneous, DerivedPropertyStatus.Provisional, "cjkEACC"),
218218
kEH_Cat(PropertyType.Miscellaneous, DerivedPropertyStatus.Approved, "kEH_Cat"),
219219
kEH_Desc(PropertyType.Miscellaneous, DerivedPropertyStatus.Approved, "kEH_Desc"),
220-
kEH_FVal(PropertyType.Miscellaneous, DerivedPropertyStatus.Provisional, "kEH_FVal"),
220+
kEH_FVal(
221+
PropertyType.Miscellaneous,
222+
DerivedPropertyStatus.Provisional,
223+
null,
224+
ValueCardinality.Unordered,
225+
"kEH_FVal"),
221226
kEH_Func(
222227
PropertyType.Miscellaneous,
223228
DerivedPropertyStatus.Provisional,

unicodetools/src/main/java/org/unicode/xml/AttributeResolver.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,11 @@ public String getAttributeValue(UcdProperty prop, int codepoint) {
212212
}
213213
return Optional.ofNullable(resolvedValue).orElse("");
214214
case kDefinition:
215-
case kEH_FVal:
216215
return resolvedValue;
216+
case kEH_FVal:
217+
if (resolvedValue != null) {
218+
return resolvedValue.replaceAll("[\\|]+", " | ");
219+
}
217220
default:
218221
if (resolvedValue != null) {
219222
return resolvedValue.replaceAll("\\" + SET_SEPARATOR, " ");

unicodetools/src/main/resources/org/unicode/props/IndexPropertyRegex.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ kEH_Cat ; SINGLE_VALUED ; ([A-IK-Z]|AA)-\d{2}
220220
kEH_Desc ; SINGLE_VALUED ; [^\t"]+
221221
kEH_Func ; MULTI_VALUED ; [^\t"]+
222222
# Revisit once the spec settles down.
223-
kEH_FVal ; SINGLE_VALUED ; [^\t"]+
223+
kEH_FVal ; MULTI_VALUED ; [bdf-hjkmnpr-twy\.,\/\-\+=;?>\&\(\)\{\}\s\x{303}\x{30C}\x{323}\x{32E}\x{331}\x{A723}\x{A725}\x{A7BD}]+
224224
kEH_HG ; MULTI_VALUED ; ([A-IK-Z]|AA)\d{1,3}[A-Za-z]{0,2}
225225
kEH_IFAO ; MULTI_VALUED ; \d{1,3},\d{1,2}[ab]?
226226
kEH_JSesh ; MULTI_VALUED ; ([A-IK-Z]|Aa|NL|NU|Ff)\d{1,3}[A-Za-z]{0,5}|(US1|US22|US248|US685)([A-IK-Z]|Aa|NL|NU)\d{1,3}[A-Za-z]{0,5}

0 commit comments

Comments
 (0)