diff options
-rw-r--r-- | Zend/tests/unicode_001.phpt | 2 | ||||
-rw-r--r-- | ext/pcre/tests/bug42298.phpt | 15 | ||||
-rw-r--r-- | ext/pcre/tests/bug47229.phpt | 10 |
3 files changed, 16 insertions, 11 deletions
diff --git a/Zend/tests/unicode_001.phpt b/Zend/tests/unicode_001.phpt index a4bd1186e4..548fc3b000 100644 --- a/Zend/tests/unicode_001.phpt +++ b/Zend/tests/unicode_001.phpt @@ -1,5 +1,7 @@ --TEST-- Comparing size of binary and unicode strings +--INI-- +unicode.runtime_encoding=utf-8 --FILE-- <?php diff --git a/ext/pcre/tests/bug42298.phpt b/ext/pcre/tests/bug42298.phpt index b6f0c30358..ea453b25ce 100644 --- a/ext/pcre/tests/bug42298.phpt +++ b/ext/pcre/tests/bug42298.phpt @@ -1,12 +1,15 @@ --TEST-- Bug #42298 (pcre gives bogus results with /u) +--INI-- +unicode.runtime_encoding=utf-8 +unicode.output_encoding=utf-8 --FILE-- <?php -$str = "A\xc2\xa3BC"; +$str = b"A\xc2\xa3BC"; preg_match_all('/\S\S/u', $str, $m); var_dump($m); preg_match_all('/\S{2}/u', $str, $m); var_dump($m); -$str = "A\xe2\x82\xac "; +$str = b"A\xe2\x82\xac "; preg_match_all('/\W\W/u', $str, $m); var_dump($m); preg_match_all('/\W{2}/u', $str, $m); var_dump($m); @@ -16,7 +19,7 @@ array(1) { [0]=> array(2) { [0]=> - unicode(3) "A£" + unicode(2) "A£" [1]=> unicode(2) "BC" } @@ -25,7 +28,7 @@ array(1) { [0]=> array(2) { [0]=> - unicode(3) "A£" + unicode(2) "A£" [1]=> unicode(2) "BC" } @@ -34,13 +37,13 @@ array(1) { [0]=> array(1) { [0]=> - unicode(4) "€ " + unicode(2) "€ " } } array(1) { [0]=> array(1) { [0]=> - unicode(4) "€ " + unicode(2) "€ " } } diff --git a/ext/pcre/tests/bug47229.phpt b/ext/pcre/tests/bug47229.phpt index 74dcf20099..96b95a255d 100644 --- a/ext/pcre/tests/bug47229.phpt +++ b/ext/pcre/tests/bug47229.phpt @@ -19,19 +19,19 @@ preg_match("/a\-{1,}/", 'a\----a', $m); var_dump($m); ?> ---EXPECT-- -string(13) "\-oh really\?" +--EXPECTF-- +%string|unicode%(13) "\-oh really\?" array(1) { [0]=> - string(4) "a---" + %string|unicode%(4) "a---" } array(1) { [0]=> - string(1) "a" + %string|unicode%(1) "a" } array(1) { [0]=> - string(5) "a----" + %string|unicode%(5) "a----" } array(0) { } |