xref: /PHP-7.4/ext/intl/tests/bug74230.phpt (revision d679f022)
1--TEST--
2Bug #74230 iconv fails to fail on surrogates
3--SKIPIF--
4<?php if(!extension_loaded('iconv')) print 'skip'; ?>
5--FILE--
6<?php
7
8$high = "\xED\xa1\x92"; // codepoint D852
9$low = "\xED\xBD\xA2"; // codepoint DF62
10$pair = $high.$low;
11var_dump(
12    @\iconv('UTF-8', 'UTF-8', $high) === false,
13    @\iconv('UTF-8', 'UTF-8', $low) === false,
14    @\iconv('UTF-8', 'UTF-8', $pair) === false
15);
16
17?>
18--EXPECT--
19bool(true)
20bool(true)
21bool(true)
22