Removed
Link Here
|
1 |
https://ssl.icu-project.org/trac/ticket/13851 |
2 |
|
3 |
--- common/ucase.cpp.orig 2018-06-21 09:39:23 UTC |
4 |
+++ common/ucase.cpp |
5 |
@@ -270,6 +270,7 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) { |
6 |
} |
7 |
} |
8 |
if(HAS_SLOT(excWord, UCASE_EXC_DELTA)) { |
9 |
+ pe=pe0; |
10 |
int32_t delta; |
11 |
GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe, delta); |
12 |
sa->add(sa->set, (excWord&UCASE_EXC_DELTA_IS_NEGATIVE)==0 ? c+delta : c-delta); |
13 |
@@ -1167,7 +1168,7 @@ ucase_toFullLower(UChar32 c, |
14 |
|
15 |
if(HAS_SLOT(excWord, UCASE_EXC_DELTA) && UCASE_IS_UPPER_OR_TITLE(props)) { |
16 |
int32_t delta; |
17 |
- GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe, delta); |
18 |
+ GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe2, delta); |
19 |
return (excWord&UCASE_EXC_DELTA_IS_NEGATIVE)==0 ? c+delta : c-delta; |
20 |
} |
21 |
if(HAS_SLOT(excWord, UCASE_EXC_LOWER)) { |
22 |
@@ -1261,7 +1262,7 @@ toUpperOrTitle(UChar32 c, |
23 |
|
24 |
if(HAS_SLOT(excWord, UCASE_EXC_DELTA) && UCASE_GET_TYPE(props)==UCASE_LOWER) { |
25 |
int32_t delta; |
26 |
- GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe, delta); |
27 |
+ GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe2, delta); |
28 |
return (excWord&UCASE_EXC_DELTA_IS_NEGATIVE)==0 ? c+delta : c-delta; |
29 |
} |
30 |
if(!upperNotTitle && HAS_SLOT(excWord, UCASE_EXC_TITLE)) { |
31 |
@@ -1469,7 +1470,7 @@ ucase_toFullFolding(UChar32 c, |
32 |
} |
33 |
if(HAS_SLOT(excWord, UCASE_EXC_DELTA) && UCASE_IS_UPPER_OR_TITLE(props)) { |
34 |
int32_t delta; |
35 |
- GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe, delta); |
36 |
+ GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe2, delta); |
37 |
return (excWord&UCASE_EXC_DELTA_IS_NEGATIVE)==0 ? c+delta : c-delta; |
38 |
} |
39 |
if(HAS_SLOT(excWord, UCASE_EXC_FOLD)) { |
40 |
--- test/intltest/strcase.cpp.orig 2018-06-21 09:38:41 UTC |
41 |
+++ test/intltest/strcase.cpp |
42 |
@@ -68,6 +68,7 @@ class StringCaseTest: public IntlTest { (public) |
43 |
void TestBug13127(); |
44 |
void TestInPlaceTitle(); |
45 |
void TestCaseMapEditsIteratorDocs(); |
46 |
+ void TestCaseMapGreekExtended(); |
47 |
|
48 |
private: |
49 |
void assertGreekUpper(const char16_t *s, const char16_t *expected); |
50 |
@@ -113,6 +114,7 @@ StringCaseTest::runIndexedTest(int32_t index, UBool ex |
51 |
TESTCASE_AUTO(TestInPlaceTitle); |
52 |
#endif |
53 |
TESTCASE_AUTO(TestCaseMapEditsIteratorDocs); |
54 |
+ TESTCASE_AUTO(TestCaseMapGreekExtended); |
55 |
TESTCASE_AUTO_END; |
56 |
} |
57 |
|
58 |
@@ -1683,6 +1685,19 @@ void StringCaseTest::TestCaseMapEditsIteratorDocs() { |
59 |
expectedSrcCoarseStringIndices[destIndex], |
60 |
coarseChangesIterator.sourceIndexFromDestinationIndex(destIndex, status)); |
61 |
} |
62 |
+} |
63 |
+ |
64 |
+void StringCaseTest::TestCaseMapGreekExtended() { |
65 |
+ // Ticket 13851 |
66 |
+ UnicodeString s(u"\u1F80\u1F88\u1FFC"); |
67 |
+ UnicodeString result(s); |
68 |
+ result.toLower(Locale::getRoot()); |
69 |
+ assertEquals(u"lower", u"\u1F80\u1F80\u1FF3", result); |
70 |
+#if !UCONFIG_NO_BREAK_ITERATION |
71 |
+ result = s; |
72 |
+ result.toTitle(nullptr, Locale::getRoot()); |
73 |
+ assertEquals(u"title", u"\u1F88\u1F80\u1FF3", result); |
74 |
+#endif |
75 |
} |
76 |
|
77 |
//#endif |