diff --git a/UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeJsp.java b/UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeJsp.java index eaa9090540..1b9f440f06 100644 --- a/UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeJsp.java +++ b/UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeJsp.java @@ -166,6 +166,19 @@ public static String getSimpleSet( String a_out; a.clear(); try { + if (setA.length() > 4 + && setA.startsWith("[:k") + && setA.endsWith(":]") + && setA.contains("=") + && !setA.substring(2, setA.length() - 2).contains(":]") + && XPropertyFactory.make() + .getProperty(setA.substring(2, setA.indexOf("="))) + .isMultivalued()) { + throw new Exception( + "POSIX-style queries for multivalued Unihan properties are temporarily disabled. Try \\p{" + + setA.substring(2, setA.length() - 2) + + "}"); + } // setA = UnicodeSetUtilities.MyNormalize(setA, Normalizer.NFC); a.addAll(UnicodeSetUtilities.parseUnicodeSet(setA)); a_out = UnicodeUtilities.getPrettySet(a, abbreviate, escape); diff --git a/UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeUtilities.java b/UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeUtilities.java index 74de135031..b7e95995c8 100644 --- a/UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeUtilities.java +++ b/UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeUtilities.java @@ -1648,6 +1648,7 @@ class PropertyAssignment { VersionInfo last; String value; } + final boolean isMultivalued = getFactory().getProperty(propName).isMultivalued(); List history = new ArrayList<>(); // TODO(eggrobin): TUP normalization chokes on sufficiently old versions, but this is not // worth debugging as we want to get rid of it. @@ -1732,17 +1733,21 @@ class PropertyAssignment { out.append( "" + + ">" + + (isMultivalued + ? "" + : ("")) + versionRange + hValue - + ""); + + (isMultivalued ? "" : "") + + ""); } } out.append(""); diff --git a/UnicodeJsps/src/main/java/org/unicode/jsp/XPropertyFactory.java b/UnicodeJsps/src/main/java/org/unicode/jsp/XPropertyFactory.java index eb52f9be07..516a6004cd 100644 --- a/UnicodeJsps/src/main/java/org/unicode/jsp/XPropertyFactory.java +++ b/UnicodeJsps/src/main/java/org/unicode/jsp/XPropertyFactory.java @@ -145,48 +145,6 @@ public String transform(Integer source) { }, false) .setMain("toNFKD", "toNFKD", UnicodeProperty.STRING, "1.1")); - - add( - new StringTransformProperty( - new StringTransform() { - @Override - public String transform(String source) { - return UCharacter.foldCase(source, true); - } - }, - false) - .setMain("toCasefold", "toCF", UnicodeProperty.STRING, "1.1")); - add( - new StringTransformProperty( - new StringTransform() { - @Override - public String transform(String source) { - return UCharacter.toLowerCase(ULocale.ROOT, source); - } - }, - false) - .setMain("toLowercase", "toLC", UnicodeProperty.STRING, "1.1")); - add( - new StringTransformProperty( - new StringTransform() { - @Override - public String transform(String source) { - return UCharacter.toUpperCase(ULocale.ROOT, source); - } - }, - false) - .setMain("toUppercase", "toUC", UnicodeProperty.STRING, "1.1")); - add( - new StringTransformProperty( - new StringTransform() { - @Override - public String transform(String source) { - return UCharacter.toTitleCase(ULocale.ROOT, source, null); - } - }, - false) - .setMain("toTitlecase", "toTC", UnicodeProperty.STRING, "1.1")); - add( new StringTransformProperty( new StringTransform() { diff --git a/UnicodeJsps/src/main/webapp/properties.jsp b/UnicodeJsps/src/main/webapp/properties.jsp index e53a70f1e5..40b105d90d 100644 --- a/UnicodeJsps/src/main/webapp/properties.jsp +++ b/UnicodeJsps/src/main/webapp/properties.jsp @@ -20,7 +20,8 @@ th { text-align: left } UtfParameters utfParameters = new UtfParameters(queryString); String propForValues = utfParameters.getParameter("a"); - UnicodeJsp.showPropsTable(out, propForValues, "properties.jsp"); + // TODO(egg): Cache this page. + //UnicodeJsp.showPropsTable(out, propForValues, "properties.jsp"); %>

Key

The Categories are from UCD diff --git a/unicodetools/src/main/java/org/unicode/props/UnicodeProperty.java b/unicodetools/src/main/java/org/unicode/props/UnicodeProperty.java index 26e36651c7..708b220e34 100644 --- a/unicodetools/src/main/java/org/unicode/props/UnicodeProperty.java +++ b/unicodetools/src/main/java/org/unicode/props/UnicodeProperty.java @@ -164,6 +164,10 @@ public UnicodeProperty setMultivalued(boolean value) { return this; } + public boolean isMultivalued() { + return isMultivalued; + } + public UnicodeProperty setDelimiter(String value) { delimiter = value; delimiterSplitter = Splitter.on(delimiter);