Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions css/css-text/text-transform/text-transform-unicode-18-1df95.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text: Unicode 18 full case mapping for U+1DF95</title>
<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-transform">
<link rel="help" href="https://www.unicode.org/Public/18.0.0/ucd/SpecialCasing.txt">
<meta name="assert" content="U+1DF95 maps to SS when uppercased and Ss when titlecased.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#uppercase { text-transform: uppercase; }
#capitalize { text-transform: capitalize; }
</style>
<span id="uppercase">&#x1DF95;</span>
<span id="capitalize">&#x1DF95;</span>
<script>
function selectedText(element) {
const selection = window.getSelection();
selection.selectAllChildren(element);
const text = selection.toString();
selection.removeAllRanges();
return text;
}

test(() => {
assert_equals(selectedText(document.getElementById("uppercase")), "SS");
}, "Unicode 18 U+1DF95 uppercases to SS");

test(() => {
assert_equals(selectedText(document.getElementById("capitalize")), "Ss");
}, "Unicode 18 U+1DF95 titlecases to Ss");
</script>
21 changes: 21 additions & 0 deletions ecmascript/regexp-unicode-18-case-folding.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>ECMAScript RegExp Unicode 18 simple case folding for U+1DF95</title>
<link rel="help" href="https://tc39.es/ecma262/#sec-runtime-semantics-canonicalize-ch">
<link rel="help" href="https://www.unicode.org/Public/18.0.0/ucd/CaseFolding.txt">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
const ligature = "\u{1DF95}";
const sharpS = "\u00DF";

test(() => {
assert_true(new RegExp(ligature, "iu").test(sharpS));
assert_true(new RegExp(sharpS, "iu").test(ligature));
}, "Unicode 18 simple case folding equates U+1DF95 with U+00DF");

test(() => {
assert_false(new RegExp(ligature, "iu").test("ss"));
assert_false(/ss/iu.test(ligature));
}, "Unicode-aware RegExp uses simple, not full, case folding for U+1DF95");
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ <h1>2d.text.measure.text-clusters-split.tentative</h1>
// [UAX#29]: https://unicode.org/reports/tr29/
// [UAX#29] GB9: × (Extend | ZWJ)
assertClusterIndexes('X\u200DY', [0, 2]);
// [UAX#29] GB9c (Unicode 18): InCB=Linker InCB=Extend* × InCB=Consonant.
// A preceding consonant is no longer required.
assertClusterIndexes('\u094D\u0915', [0]);
assertClusterIndexes('\u094D\u0308\u0915', [0]);
assertClusterIndexes('\u1B44\u1B13', [0]);
assertClusterIndexes('\u1CF5\u0995', [0]);
// GB9c does not prevent a break before a non-consonant.
assertClusterIndexes('\u094D\u0308X', [0, 2]);
// [UAX#29] GB11: \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic}
assertClusterIndexes('\u{1FFFD}\u200D\u{1FFFD}', [0]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ <h1>2d.text.measure.text-clusters-split.tentative</h1>
// [UAX#29]: https://unicode.org/reports/tr29/
// [UAX#29] GB9: × (Extend | ZWJ)
assertClusterIndexes('X\u200DY', [0, 2]);
// [UAX#29] GB9c (Unicode 18): InCB=Linker InCB=Extend* × InCB=Consonant.
// A preceding consonant is no longer required.
assertClusterIndexes('\u094D\u0915', [0]);
assertClusterIndexes('\u094D\u0308\u0915', [0]);
assertClusterIndexes('\u1B44\u1B13', [0]);
assertClusterIndexes('\u1CF5\u0995', [0]);
// GB9c does not prevent a break before a non-consonant.
assertClusterIndexes('\u094D\u0308X', [0, 2]);
// [UAX#29] GB11: \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic}
assertClusterIndexes('\u{1FFFD}\u200D\u{1FFFD}', [0]);
t.done();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ t.step(function() {
// [UAX#29]: https://unicode.org/reports/tr29/
// [UAX#29] GB9: × (Extend | ZWJ)
assertClusterIndexes('X\u200DY', [0, 2]);
// [UAX#29] GB9c (Unicode 18): InCB=Linker InCB=Extend* × InCB=Consonant.
// A preceding consonant is no longer required.
assertClusterIndexes('\u094D\u0915', [0]);
assertClusterIndexes('\u094D\u0308\u0915', [0]);
assertClusterIndexes('\u1B44\u1B13', [0]);
assertClusterIndexes('\u1CF5\u0995', [0]);
// GB9c does not prevent a break before a non-consonant.
assertClusterIndexes('\u094D\u0308X', [0, 2]);
// [UAX#29] GB11: \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic}
assertClusterIndexes('\u{1FFFD}\u200D\u{1FFFD}', [0]);
t.done();
Expand Down
8 changes: 8 additions & 0 deletions html/canvas/tools/yaml/text.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2130,6 +2130,14 @@
// [UAX#29]: https://unicode.org/reports/tr29/
// [UAX#29] GB9: × (Extend | ZWJ)
assertClusterIndexes('X\u200DY', [0, 2]);
// [UAX#29] GB9c (Unicode 18): InCB=Linker InCB=Extend* × InCB=Consonant.
// A preceding consonant is no longer required.
assertClusterIndexes('\u094D\u0915', [0]);
assertClusterIndexes('\u094D\u0308\u0915', [0]);
assertClusterIndexes('\u1B44\u1B13', [0]);
assertClusterIndexes('\u1CF5\u0995', [0]);
// GB9c does not prevent a break before a non-consonant.
assertClusterIndexes('\u094D\u0308X', [0, 2]);
// [UAX#29] GB11: \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic}
assertClusterIndexes('\u{1FFFD}\u200D\u{1FFFD}', [0]);

Expand Down