Skip to content

Commit bc47380

Browse files
committed
Fix casefold
1 parent b6bd9c3 commit bc47380

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_unicode.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*graalpython.lib-python.3.test.test_unicode.UnicodeTest.test_capitalize
1616
*graalpython.lib-python.3.test.test_unicode.UnicodeTest.test_capitalize_nonascii
1717
*graalpython.lib-python.3.test.test_unicode.UnicodeTest.test_case_operation_overflow
18+
*graalpython.lib-python.3.test.test_unicode.UnicodeTest.test_casefold
1819
*graalpython.lib-python.3.test.test_unicode.UnicodeTest.test_center
1920
*graalpython.lib-python.3.test.test_unicode.UnicodeTest.test_codecs
2021
*graalpython.lib-python.3.test.test_unicode.UnicodeTest.test_codecs_idna

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str/StringBuiltins.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,9 +2269,7 @@ public abstract static class CasefoldNode extends PythonUnaryBuiltinNode {
22692269
@Specialization
22702270
@TruffleBoundary
22712271
static String doString(String self) {
2272-
// TODO(fa) implement properly using 'unicodedata_db' (see 'unicodeobject.c' function
2273-
// 'unicode_casefold_impl')
2274-
return self.toLowerCase();
2272+
return UCharacter.foldCase(self, true);
22752273
}
22762274

22772275
@Specialization(replaces = "doString")

0 commit comments

Comments
 (0)