On 20/02/2022 23:54, Craig Francis wrote:
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.
Unfortunately, enabling by default in the distributed source files won't
make any difference to that situation, as anything that can be built as
a separate library file can (and seemingly will) be split into a
separate package in a binary distribution.
Making the extension always available (impossible to compile without it)
is a potential option, and I think has been suggested before; I'm not
sure of the exact pros and cons.
everyone could trust functions like `mb_strlen()` are available as well.
I would personally encourage everyone to have ext/intl installed and use
grapheme_strlen() instead of mb_strlen(), because knowing whether a
particular instance of the string "Nguyễn" is written with 6, 7, or 8
code points is not nearly as useful as knowing that it looks like 6
"characters" to a user either way.
Regards,
--
Rowan Tommins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php