Skip to content

Commit c40ca79

Browse files
authored
Address feedback on character.jsp from the public mailing list (#1153)
* character.jsp * Make it work * No `toList()` for old `Stream` * Make the tests compile * exemplars are miscellaneous, not string-valued * Fix bidiref which still wanted -Update and bump it to 16 * Another thing that was stuck at 14
1 parent 852f285 commit c40ca79

File tree

7 files changed

+144
-57
lines changed

7 files changed

+144
-57
lines changed

UnicodeJsps/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM alpine as cbuild
33
WORKDIR /build
44
RUN apk add --update wget make gcc musl-dev
55
ARG CPATH=https://www.unicode.org/Public/PROGRAMS/BidiReferenceC/
6-
ARG CVERSION=15.1.0
6+
# FIX_FOR_NEW_VERSION
7+
ARG CVERSION=16.0.0
78
RUN wget -np -nv --reject-regex='.*\.(lib|exe)$' --cut-dirs=4 -nH -r ${CPATH}${CVERSION}/
89
RUN cd source && gcc -I ../include/ -static -Os -o3 -o bidiref1 bidiref1.c brutils.c brtest.c brtable.c brrule.c
910
RUN ls -lh /build/source/bidiref1 && (/build/source/bidiref1 || true)

UnicodeJsps/src/main/java/org/unicode/jsp/UBAVersion.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ public class UBAVersion {
1616
Age_Values.V11_0,
1717
Age_Values.V12_0,
1818
Age_Values.V13_0,
19-
Age_Values.V14_0
19+
Age_Values.V14_0,
20+
Age_Values.V15_0,
21+
Age_Values.V15_1,
22+
Age_Values.V16_0
23+
// FIX_FOR_NEW_VERSION
2024
/* Current version is always last */
2125
);
2226

UnicodeJsps/src/main/java/org/unicode/jsp/UnicodeJsp.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import java.io.IOException;
1414
import java.io.PrintWriter;
1515
import java.io.StringWriter;
16+
import java.util.ArrayList;
1617
import java.util.Arrays;
1718
import java.util.Collection;
1819
import java.util.List;
@@ -131,8 +132,15 @@ else if (choice.equals("Sentence"))
131132

132133
public static void showProperties(
133134
int cp, String history, boolean showDevProperties, Appendable out) throws IOException {
135+
List<String> originalParameters = new ArrayList<>();
136+
if (!history.isEmpty()) {
137+
originalParameters.add("history=" + history);
138+
}
139+
if (showDevProperties) {
140+
originalParameters.add("showDevProperties=1");
141+
}
134142
showDevProperties = Settings.latestVersionPhase == ReleasePhase.BETA || showDevProperties;
135-
UnicodeUtilities.showProperties(cp, history, showDevProperties, out);
143+
UnicodeUtilities.showProperties(cp, history, showDevProperties, originalParameters, out);
136144
}
137145

138146
static String defaultIdnaInput =
@@ -201,10 +209,18 @@ public static void showSet(
201209
boolean collate,
202210
Appendable out)
203211
throws IOException {
212+
List<String> originalParameters =
213+
showDevProperties ? List.of("showDevProperties=1") : List.of();
204214
showDevProperties = Settings.latestVersionPhase == ReleasePhase.BETA || showDevProperties;
205215
CodePointShower codePointShower =
206216
new CodePointShower(
207-
grouping, info, showDevProperties, abbreviate, ucdFormat, collate);
217+
grouping,
218+
info,
219+
showDevProperties,
220+
abbreviate,
221+
ucdFormat,
222+
collate,
223+
originalParameters);
208224
UnicodeUtilities.showSetMain(a, showDevProperties, codePointShower, out);
209225
}
210226

@@ -416,8 +432,10 @@ public static String testIdnaLines(String lines, String filter) {
416432
}
417433

418434
public static String getIdentifier(String script, boolean showDevProperties) {
435+
List<String> originalParameters =
436+
showDevProperties ? List.of("showDevProperties=1") : List.of();
419437
showDevProperties = Settings.latestVersionPhase == ReleasePhase.BETA || showDevProperties;
420-
return UnicodeUtilities.getIdentifier(script, showDevProperties);
438+
return UnicodeUtilities.getIdentifier(script, showDevProperties, originalParameters);
421439
}
422440

423441
static final String VERSIONS =

0 commit comments

Comments
 (0)