Skip to content

Commit 771177a

Browse files
committed
Don't pass Unicode to char::is_upper
1 parent 26b54cc commit 771177a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/libcore/str.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,10 +1687,9 @@ mod tests {
16871687
#[test]
16881688
fn test_to_upper() {
16891689
// char::to_upper, and hence str::to_upper
1690-
// are culturally insensitive: I'm not sure they
1691-
// really work for anything but English ASCII, but YMMV
1692-
1693-
let unicode = "\u65e5\u672c";
1690+
// are culturally insensitive: they only work for ASCII
1691+
// (see Issue #1985)
1692+
let unicode = ""; //"\u65e5\u672c"; // uncomment once non-ASCII works
16941693
let input = "abcDEF" + unicode + "xyz:.;";
16951694
let expected = "ABCDEF" + unicode + "XYZ:.;";
16961695
let actual = to_upper(input);

0 commit comments

Comments
 (0)