Doc #80671 [Opn->Csd]: mb_convert_encoding() throws ValueError on invalid encoding

From: Date: Mon, 03 May 2021 08:52:53 +0000
Subject: Doc #80671 [Opn->Csd]: mb_convert_encoding() throws ValueError on invalid encoding
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18746@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80671&edit=1 ID: 80671 Updated by: git@php.net Reported by: alec at alec dot pl Summary: mb_convert_encoding() throws ValueError on invalid encoding -Status: Open +Status: Closed Type: Documentation Problem Package: mbstring related PHP Version: 8.0.1 Block user comment: N Private report: N New Comment: Automatic comment on behalf of thinkverse (author) and web-flow (committer) Revision: https://github.com/php/doc-en/commit/c9893954e17ec13bf66f54433e72c8af026406cf Log: Fix #80671: Update mb_convert_encoding Previous Comments: ------------------------------------------------------------------------ [2021-05-01 14:03:14] hallberg dot kim at gmail dot com The following pull request has been associated: Patch Name: [80671] Update mb_convert_encoding. On GitHub: https://github.com/php/doc-en/pull/582 Patch: https://github.com/php/doc-en/pull/582.patch ------------------------------------------------------------------------ [2021-01-26 19:03:11] alec at alec dot pl https://github.com/roundcube/roundcubemail/blob/9b69cce641a8c34c7efcb34628287d4fadf7bbaf/program/lib/Roundcube/rcube_charset.php#L240 explains why I never saw a warning ;) ------------------------------------------------------------------------ [2021-01-26 18:52:48] alec at alec dot pl All right, it looks I was mistaken about no warning in earlier versions, but since Roundcube exists I've never saw such a warning (and we're dealing with all kinds of "invalid" encodings). Maybe that has something to do with removal of some code path that was using iconv() before mbstring methods. So, it is a documentation problem. ------------------------------------------------------------------------ [2021-01-26 13:34:28] nikic@php.net As expected, this already threw a warning since at least PHP 4.3: https://3v4l.org/5cErI A changelog entry that this throws a ValueError exception since PHP 8.0 is missing through. ------------------------------------------------------------------------ [2021-01-26 07:39:25] alec at alec dot pl BTW, regarding the error message, the encoding is not invalid, it is unsupported. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=80671 -- Edit this bug report at https://bugs.php.net/bug.php?id=80671&edit=1

« previous php.doc.bugs (#18746) next »