mirror of
https://github.com/php/php-src.git
synced 2024-09-30 22:36:12 +00:00
e2d4d700cf
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.
15 lines
272 B
PHP
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"
|