php-src/ext/mbstring/tests/zend_multibyte-07.phpt
Nikita Popov e2d4d700cf Fix yy_limit computation after encoding switch
The three assignments above this line are still broken - they assume
that byte offsets in one encoding directly map to byte offsets in
another encoding.

I'm fixing the length here because it is the one causing out-of-bounds
reads and is easy to fix. For the others we'd have to actually compute
new offsets.
2014-09-11 14:52:59 +02:00

15 lines
272 B
PHP

--TEST--
zend multibyte (7)
--INI--
error_reporting=E_ALL & ~E_DEPRECATED
zend.multibyte=On
zend.script_encoding=ISO-8859-1
mbstring.internal_encoding=EUC-JP
--FILE--
<?php
declare(encoding="UTF-8");
var_dump(bin2hex("テスト"));
?>
--EXPECT--
string(12) "a5c6a5b9a5c8"