From 771177a8142d3cb1d431c71b80f4b9b20ac35339 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 15 Mar 2012 15:29:55 -0700 Subject: [PATCH] Don't pass Unicode to char::is_upper --- src/libcore/str.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libcore/str.rs b/src/libcore/str.rs index cacec9e740d..aba5b22d85a 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -1687,10 +1687,9 @@ mod tests { #[test] fn test_to_upper() { // char::to_upper, and hence str::to_upper - // are culturally insensitive: I'm not sure they - // really work for anything but English ASCII, but YMMV - - let unicode = "\u65e5\u672c"; + // are culturally insensitive: they only work for ASCII + // (see Issue #1985) + let unicode = ""; //"\u65e5\u672c"; // uncomment once non-ASCII works let input = "abcDEF" + unicode + "xyz:.;"; let expected = "ABCDEF" + unicode + "XYZ:.;"; let actual = to_upper(input);