Re: [RFC] Deprecate and Remove utf8_encode and utf8_decode
| From: | Craig Francis | Date: | Sun, 20 Feb 2022 23:54:46 +0000 |
| Subject: | Re: [RFC] Deprecate and Remove utf8_encode and utf8_decode | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117083@lists.php.net to get a copy of this message | ||
On Sun, 20 Feb 2022 at 23:12, Rowan Tommins <rowan.collins@gmail.com> wrote:
> I don't have hard facts to back it up, but my impression is that
> ext/mbstring is quite commonly installed, and required by apps and
> libraries. Unlike the other two, it has no system dependencies, because
> the implementation is entirely in PHP's source tree.
>
Thanks for confirming those details Rowan.
I'm just wondering, and this would not be necessary... considering how most
systems need to deal with UTF-8 data today, could an argument be made for
enabling etc/mbstring by default?
I'm fairly sure Ubuntu and CentOS need to install the package
php-mbstring separately; whereas my limited experience with cheep/shared
hosting, they tend to have it enabled.
Then mb_convert_encoding() could become the default suggested
alternative, and everyone could trust functions like mb_strlen() are
available as well.
Just for my own interest - technically mbstring uses libmbfl, but that's
already available from /ext/mbstring/libmbfl/
Craig