]> granicus.if.org Git - icu/commitdiff
ICU-9139 Fix non-ASCII characters in regextst.cpp
authorYoshito Umaoka <y.umaoka@gmail.com>
Wed, 29 Feb 2012 16:51:39 +0000 (16:51 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Wed, 29 Feb 2012 16:51:39 +0000 (16:51 +0000)
X-SVN-Rev: 31540

icu4c/source/test/intltest/regextst.cpp

index f5f55e3d86cd573bf8a1241039d964bee77c7176..09f205aad99018fdb25f9eb1cdabd5431b3e9ea2 100644 (file)
@@ -573,9 +573,9 @@ void RegexTest::Basic() {
         UParseError pe;
         UErrorCode  status = U_ZERO_ERROR;
         RegexPattern *pattern;
-        pattern = RegexPattern::compile("aßx", UREGEX_CASE_INSENSITIVE, pe, status);
+        pattern = RegexPattern::compile(UNICODE_STRING_SIMPLE("a\\u00dfx").unescape(), UREGEX_CASE_INSENSITIVE, pe, status);
         RegexPatternDump(pattern);
-        RegexMatcher *m = pattern->matcher("aßxzzz", status);
+        RegexMatcher *m = pattern->matcher(UNICODE_STRING_SIMPLE("a\\u00dfxzzz").unescape(), status);
         UBool result = m->find();
         printf("result = %d\n", result);
         // REGEX_FIND("", "<0>ab<1>cc</1><2>ccc</2></0>ddd");