[php-src] Issue #14703: Undocumented mb_substr behaviour in PHP 8.3?

From: Date: Fri, 28 Jun 2024 15:18:47 +0000
Subject: [php-src] Issue #14703: Undocumented mb_substr behaviour in PHP 8.3?
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247170@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14703 Author: jahyvari ### Description The following code: ```php <?php var_dump( mb_convert_encoding( mb_substr( mb_convert_encoding( "test ääöö", "ISO-8859-15", "UTF-8" ), 0, null, "UTF-8" ), "UTF-8", "ISO-8859-15" ) ); ``` Resulted this output in PHP 8.2: ``` string(13) "test ääöö" ``` But resulted this output in PHP 8.3: ``` string(9) "test ????" ``` Based on this, did the pre PHP 8.3 mb_substr return the string always in the "raw" binary form, but in PHP 8.3 it will return the string using the passed encoding, and therefore could lead to an encoding conversion? ### PHP Version PHP 8.3.8 ### Operating System _No response_

« previous php.bugs (#247170) next »