summaryrefslogtreecommitdiff
path: root/ext/intl/tests/bug74230.phpt
blob: 685b0582bce5a173bd55998b14de21dfd6b7e7a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--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)