Bug->Doc #80626 [Opn->Fbk]: Passing 'pass' to mb_convert_encoding()'s $from_encoding not working since 7.3
| From: | requinix@php.net | Date: | Thu, 14 Jan 2021 18:45:58 +0000 |
| Subject: | Bug->Doc #80626 [Opn->Fbk]: Passing 'pass' to mb_convert_encoding()'s $from_encoding not working since 7.3 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18393@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80626&edit=1
ID: 80626
Updated by: requinix@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: Open
+Status: Feedback
-Type: Bug
+Type: Documentation Problem
-Package: Documentation problem
+Package: mbstring related
Operating System: Linux
PHP Version: 7.4.14
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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