Req #73088 [Opn]: str_check_encoding and str_scrub
| From: | nikic@php.net | Date: | Thu, 15 Sep 2016 10:43:22 +0000 |
| Subject: | Req #73088 [Opn]: str_check_encoding and str_scrub | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204060@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73088&edit=1
ID: 73088
Updated by: nikic@php.net
Reported by: masakielastic at gmail dot com
Summary: str_check_encoding and str_scrub
Status: Open
Type: Feature/Change Request
Package: mbstring related
PHP Version: Next Minor Version
Block user comment: N
Private report: N
New Comment:
As these functions deal with multibyte strings, they naturally belong into the mbstring extension,
which, as you mention, already has analogous functions. Why would these need to be mirrored into
ext/standard?
Previous Comments:
------------------------------------------------------------------------
[2016-09-15 10:33:46] masakielastic at gmail dot com
fixed title.
------------------------------------------------------------------------
[2016-09-15 10:26:36] masakielastic at gmail dot com
Description:
------------
htmlspecialchars have an ability to check character encoding and replace ill-formed byte sequences
(ENT_SUBSTITUTE) since PHP 5.4. The ability is useful for not only escaping special chars but
general. Mbstring have same feture such as mb_check_encoding and mb_scrub (PHP 7.2 dev).
bool str_check_encoding ([ string $str[,string $encoding = ini_get("default_charset") ]] )
bool str_scrub ([ string $str[,string $encoding = ini_get("default_charset") ]] )
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73088&edit=1