File tree Expand file tree Collapse file tree 5 files changed +31
-5
lines changed Expand file tree Collapse file tree 5 files changed +31
-5
lines changed Original file line number Diff line number Diff line change 4
4
- [ Remove icu_datagen's dep on ` fractional ` ] ( https://github.com/unicode-org/icu4x/pull/4472 )
5
5
6
6
7
+ - Fix normalization of character whose decomposition contains more than one starter and ends with a non-starter followed by a non-starter
8
+ with a lower Canonical Combining Class than the last character of the decomposition. (https://github.com/unicode-org/icu4x/pull/4530 )
9
+
10
+
7
11
## icu4x 1.4 (Nov 16, 2023)
8
12
9
13
- General
10
14
- MSRV is now 1.67
11
-
15
+
12
16
- Components
13
17
- Compiled data updated to CLDR 44 and ICU 74 (https://github.com/unicode-org/icu4x/pull/4245 )
14
18
- ` icu_calendar `
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ name = "icu_normalizer"
7
7
description = " API for normalizing text into Unicode Normalization Forms"
8
8
license-file = " LICENSE"
9
9
10
- version.workspace = true
10
+ version = " 1.4.1 "
11
11
rust-version.workspace = true
12
12
authors.workspace = true
13
13
edition.workspace = true
Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ where
637
637
i += 1 ;
638
638
// Half-width kana and iota subscript don't occur in the tails
639
639
// of these multicharacter decompositions.
640
- if decomposition_starts_with_non_starter ( trie_value) {
640
+ if ! decomposition_starts_with_non_starter ( trie_value) {
641
641
combining_start = i;
642
642
}
643
643
}
@@ -676,7 +676,7 @@ where
676
676
i += 1 ;
677
677
// Half-width kana and iota subscript don't occur in the tails
678
678
// of these multicharacter decompositions.
679
- if decomposition_starts_with_non_starter ( trie_value) {
679
+ if ! decomposition_starts_with_non_starter ( trie_value) {
680
680
combining_start = i;
681
681
}
682
682
}
Original file line number Diff line number Diff line change @@ -1308,6 +1308,28 @@ fn test_utf16_basic() {
1308
1308
) ;
1309
1309
}
1310
1310
1311
+ #[ test]
1312
+ fn test_accented_digraph ( ) {
1313
+ let normalizer: DecomposingNormalizer = DecomposingNormalizer :: new_nfkd ( ) ;
1314
+ assert_eq ! (
1315
+ normalizer. normalize( "\u{01C4} \u{0323} " ) ,
1316
+ "DZ\u{0323} \u{030C} "
1317
+ ) ;
1318
+ assert_eq ! (
1319
+ normalizer. normalize( "DZ\u{030C} \u{0323} " ) ,
1320
+ "DZ\u{0323} \u{030C} "
1321
+ ) ;
1322
+ }
1323
+
1324
+ #[ test]
1325
+ fn test_ddd ( ) {
1326
+ let normalizer: DecomposingNormalizer = DecomposingNormalizer :: new_nfd ( ) ;
1327
+ assert_eq ! (
1328
+ normalizer. normalize( "\u{0DDD} \u{0334} " ) ,
1329
+ "\u{0DD9} \u{0DCF} \u{0334} \u{0DCA} "
1330
+ ) ;
1331
+ }
1332
+
1311
1333
#[ test]
1312
1334
fn test_is_normalized ( ) {
1313
1335
let nfd: DecomposingNormalizer = DecomposingNormalizer :: new_nfd ( ) ;
You can’t perform that action at this time.
0 commit comments