Doc #80626 [Fbk->NoF]: Passing 'pass' to mb_convert_encoding()'s $from_encoding not working since 7.3
Edit report at https://bugs.php.net/bug.php?id=80626&edit=1
ID: 80626
Updated by: php-bugs@lists.php.net
Reported by: powtac at gmx dot de
Summary: Passing 'pass' to mb_convert_encoding()'s
$from_encoding not working since 7.3
-Status: Feedback
+Status: No Feedback
Type: Documentation Problem
Package: mbstring related
Operating System: Linux
PHP Version: 7.4.14
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2021-01-14 18:45:58] requinix@php.net
Were the docs changed at the same time as 7.3.0? Because according to what it says now,
"pass" is only allowed for a php.ini setting. It means not to perform any conversion at
all, and it doesn't make sense to support that in normal function calls.
------------------------------------------------------------------------
[2021-01-14 18:39:31] powtac at gmx dot de
Description:
------------
According to the docs 'pass' is an option for the third parameter of mb_convert_encoding()
(https://php.net/function.mb-convert-encoding), see https://www.php.net/manual/en/mbstring.supported-encodings.php
where it says:
"Any php.ini entry which accepts an encoding name can also use the values "auto" and
"pass". mbstring functions which accept an encoding name can also use the value
"auto". If "pass" is set, no character encoding conversion is performed."
But actually an Warning occurs when using 'pass' at mb_convert_encoding() from PHP 7.3, it
used to work without Warning before PHP 7.3.
See https://3v4l.org/fbRiW#output
Test script:
---------------
<?php
// https://3v4l.org/fbRiW#output
echo mb_convert_encoding('a', 'UTF-8', 'pass');
?>
Expected result:
----------------
No warning should occur or the docs need to be adjusted for the 'pass' parameter.
Actual result:
--------------
Warning: mb_convert_encoding(): Unable to create character encoding converter in ... on line ...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80626&edit=1
Thread (3 messages)