Skip to content

Commit 71a08a9

Browse files
committed
ASCII to Block=ASCII (short for Basic Latin) passim
1 parent 12e532c commit 71a08a9

File tree

17 files changed

+28
-26
lines changed

17 files changed

+28
-26
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class BidiCharMap {
4848

4949
for (UnicodeSetIterator it =
5050
new UnicodeSetIterator(
51-
new UnicodeSet("[[:ascii:]-[[:cc:]-[:whitespace:]]]"));
51+
new UnicodeSet("[[:Block=ASCII:]-[[:cc:]-[:whitespace:]]]"));
5252
it.next(); ) {
5353
asciiHackMap.put(
5454
it.codepoint,

UnicodeJsps/src/test/java/org/unicode/jsptest/TestJsp.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,9 @@ public void TestMapping() {
743743
assertContains(sample, "abcd");
744744
sample = UnicodeJsp.showTransform("bc > CB; X > xx;", "Abcd");
745745
assertContains(sample, "ACBd");
746-
sample = UnicodeJsp.showTransform("lower", "[[:ascii:]{Abcd}]");
746+
sample = UnicodeJsp.showTransform("lower", "[[:Block=ASCII:]{Abcd}]");
747747
assertContains(sample, "\u00A0A\u00A0");
748-
sample = UnicodeJsp.showTransform("bc > CB; X > xx;", "[[:ascii:]{Abcd}]");
748+
sample = UnicodeJsp.showTransform("bc > CB; X > xx;", "[[:Block=ASCII:]{Abcd}]");
749749
assertContains(sample, "\u00A0ACBd\u00A0");
750750
sample = UnicodeJsp.showTransform("casefold", "[\\u0000-\\u00FF]");
751751
assertContains(sample, "\u00A0\u00E1\u00A0");
@@ -791,7 +791,7 @@ public void TestStuff() throws IOException {
791791
UnicodeJsp.showSet(
792792
"sc gc",
793793
"",
794-
new UnicodeSet("[[:ascii:]{123}{ab}{456}]"),
794+
new UnicodeSet("[[:Block=ASCII:]{123}{ab}{456}]"),
795795
false,
796796
true,
797797
true,
@@ -912,7 +912,7 @@ public void TestParameters() {
912912

913913
@Test
914914
public void TestRegex() {
915-
final String fix = UnicodeRegex.fix("ab[[:ascii:]&[:Ll:]]*c");
915+
final String fix = UnicodeRegex.fix("ab[[:Block=ASCII:]&[:Ll:]]*c");
916916
assertEquals("", "ab[a-z]*c", fix);
917917
assertEquals(
918918
"",
@@ -1028,7 +1028,7 @@ public void TestBnf() {
10281028
+ "host = \\/\\/ reserved+;\n"
10291029
+ "query = [\\=reserved]+;\n"
10301030
+ "fragment = reserved+;\n"
1031-
+ "reserved = [[:ascii:][:sc=grek:]&[:alphabetic:]];\n",
1031+
+ "reserved = [[:Block=ASCII:][:sc=grek:]&[:alphabetic:]];\n",
10321032
"http://αβγ?huh=hi#there"
10331033
},
10341034
// {

UnicodeJsps/src/test/java/org/unicode/jsptest/TestUnicodeSet.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ public void TestSets() {
514514
checkProperties("[:isNFC=false:]", "[\u212B]", "[a]");
515515
checkProperties("[:toNFD=A\u0300:]", "[\u00C0]");
516516
checkProperties("[:toLowercase= /a/ :]", "[aA]");
517-
checkProperties("[:ASCII:]", "[z]");
517+
checkProperties("[:Block=ASCII:]", "[z]");
518518
checkProperties("[:lowercase:]", "[a]");
519519
checkProperties("[:toNFC=/\\./:]", "[.]");
520520
checkProperties("[:toNFKC=/\\./:]", "[\u2024]");
@@ -586,8 +586,8 @@ public void TestSetSyntax() {
586586
checkProperties("[:subhead=/Syllables/:]", "[\u1200]");
587587
// showIcuEnums();
588588
checkProperties("\\p{ccc:0}", "\\p{ccc=0}", "[\u0308]");
589-
checkProperties("\\p{isNFC}", "[:ASCII:]", "[\u212B]");
590-
checkProperties("[:isNFC=no:]", "[\u212B]", "[:ASCII:]");
589+
checkProperties("\\p{isNFC}", "[:Block=ASCII:]", "[\u212B]");
590+
checkProperties("[:isNFC=no:]", "[\u212B]", "[:Block=ASCII:]");
591591
checkProperties("[:dt!=none:]&[:toNFD=/^\\p{ccc:0}/:]", "[\u00A0]", "[\u0340]");
592592
checkProperties("[:toLowercase!=@code point@:]", "[A-Z\u00C0]", "[abc]");
593593
checkProperties("[:toNfkc!=@toNfc@:]", "[\\u00A0]", "[abc]");

unicodetools/src/main/java/org/unicode/draft/CldrUtility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ public static String toRegex(UnicodeSet source) {
702702
"foo",
703703
"([ \\- \\\\ \\[ \\] ]) > '\\' $1 ;"
704704
// + " ([:c:]) > &hex($1);"
705-
+ " ([[:control:][[:z:]&[:ascii:]]]) > &hex($1);",
705+
+ " ([[:control:][[:z:]&[:Block=ASCII:]]]) > &hex($1);",
706706
Transliterator.FORWARD);
707707

708708
/**

unicodetools/src/main/java/org/unicode/draft/GeneratePickerData2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ class GeneratePickerData2 {
135135

136136
static Comparator<String> buttonComparator =
137137
new MultilevelComparator(
138-
// new UnicodeSetInclusionFirst(ScriptCategories.parseUnicodeSet("[:ascii:]")),
138+
// new
139+
// UnicodeSetInclusionFirst(ScriptCategories.parseUnicodeSet("[:Block=ASCII:]")),
139140
// new
140141
// UnicodeSetInclusionFirst(ScriptCategories.parseUnicodeSet("[[:Letter:]&[:^NFKC_QuickCheck=N:]]")),
141142
new UnicodeSetInclusionFirst(

unicodetools/src/main/java/org/unicode/idna/IdnaTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
public class IdnaTypes {
77

88
public static final UnicodeSet OTHER_DOT_SET = new UnicodeSet("[. 。。]").freeze();
9-
public static final UnicodeSet ASCII = new UnicodeSet("[:ASCII:]").freeze();
9+
public static final UnicodeSet ASCII = new UnicodeSet("[:Block=ASCII:]").freeze();
1010
public static final UnicodeSet LABEL_ASCII = new UnicodeSet("[\\-0-9a-zA-Z]").freeze();
1111
public static final Pattern DOT = Pattern.compile("[.]");
1212
public static final Pattern DOTS = Pattern.compile("[.. 。。]");

unicodetools/src/main/java/org/unicode/idna/Uts46.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public boolean handleLine(int start, int end, String[] items) {
9292
// UnicodeSetUtilities.parseUnicodeSet("[[:any:]" +
9393
// " - [:c:] - [:z:]" +
9494
// " - [:Block=Ideographic_Description_Characters:]" +
95-
// "- [:ascii:] - [\uFFFC \uFFFD]" +
95+
// "- [:Block=ASCII:] - [\uFFFC \uFFFD]" +
9696
// " [\\u002D\\u002Ea-zA-Z0-9]" +
9797
// "]", TableStyle.simple)
9898
// .freeze();

unicodetools/src/main/java/org/unicode/jsp/UnicodeRegex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public String compileBnf(String bnfLines) {
164164
* host = // reserved+;
165165
* query = [\\=reserved]+;
166166
* fragment = reserved+;
167-
* reserved = [[:ascii:][:alphabetic:]];
167+
* reserved = [[:Block=ASCII:][:alphabetic:]];
168168
* </pre>
169169
*
170170
* <p>Caveats: at this point the parsing is simple; for example, # cannot be quoted (use

unicodetools/src/main/java/org/unicode/text/UCA/MakeNamesChart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ static String showChar(int cp, boolean addRlmIfNeeded) {
771771
return result;
772772
}
773773

774-
// static final UnicodeSet noname = new UnicodeSet("[[:ascii:][:ideographic:]]");
774+
// static final UnicodeSet noname = new UnicodeSet("[[:Block=ASCII:][:ideographic:]]");
775775
static final Map hasNoNameCan = new TreeMap();
776776
static final Map hasNameCan = new TreeMap();
777777
static final Map hasNoNameComp = new TreeMap();

unicodetools/src/main/java/org/unicode/text/UCA/WriteCollationData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,9 +1672,9 @@ static final String quoteOperand(String s) {
16721672
* '9' || (c >= 0xA0 && !UCharacterProperty.isRuleWhiteSpace(c))
16731673
*/
16741674
needsQuoting =
1675-
new UnicodeSet("[[:whitespace:][:z:][:c:][:ascii:]-[a-zA-Z0-9]-[:cn:]]")
1675+
new UnicodeSet("[[:whitespace:][:z:][:c:][:Block=ASCII:]-[a-zA-Z0-9]-[:cn:]]")
16761676
.addAll(cn); //
1677-
// "[[:ascii:]-[a-zA-Z0-9]-[:c:]-[:z:]]"); //
1677+
// "[[:Block=ASCII:]-[a-zA-Z0-9]-[:c:]-[:z:]]"); //
16781678
// [:whitespace:][:c:][:z:]
16791679
// for (int i = 0; i <= 0x10FFFF; ++i) {
16801680
// if (UCharacterProperty.isRuleWhiteSpace(i)) needsQuoting.add(i);

0 commit comments

Comments
 (0)