diff options
| -rw-r--r-- | ext/intl/tests/bug74230.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/intl/tests/bug74230.phpt b/ext/intl/tests/bug74230.phpt new file mode 100644 index 0000000000..70ef6ae39a --- /dev/null +++ b/ext/intl/tests/bug74230.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #74230 iconv fails to fail on surrogates +--SKIPIF-- +<?php if(!extension_loaded('iconv')) print 'skip'; ?> +--FILE-- +<?php + +$high = "\xED\xa1\x92"; // codepoint D852 +$low = "\xED\xBD\xA2"; // codepoint DF62 +$pair = $high.$low; +var_dump( + @\iconv('UTF-8', 'UTF-8', $high) === false, + @\iconv('UTF-8', 'UTF-8', $low) === false, + @\iconv('UTF-8', 'UTF-8', $pair) === false +); + +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) + |
