Bug #67869 [Opn]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly

From: Date: Mon, 18 May 2015 13:32:25 +0000
Subject: Bug #67869 [Opn]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192731@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67869&edit=1 ID: 67869 Updated by: cmb@php.net Reported by: heurika at gmail dot com Summary: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly Status: Open Type: Bug Package: Filter related Operating System: Debian 7 PHP Version: 5.5.15 Block user comment: N Private report: N New Comment: I can't reproduce the issue, see <http://3v4l.org/uQ1C5>. Previous Comments: ------------------------------------------------------------------------ [2014-08-20 08:00:28] heurika at gmail dot com Description: ------------ The function FILTER_SANITIZE_FULL_SPECIAL_CHARS doesn't returns the chars equivalent to calling htmlspecialchars() with ENT_QUOTES set. php.ini: default_charset = "utf-8" Test script: --------------- <?php $string = '𝌆'; echo 'filter_var: ' . filter_var($string, FILTER_SANITIZE_FULL_SPECIAL_CHARS) . PHP_EOL; echo 'htmlspecialchars: ' . htmlspecialchars($string, ENT_QUOTES); Expected result: ---------------- filter_var: 𝌆 htmlspecialchars: 𝌆 Actual result: -------------- filter_var: ð��� htmlspecialchars: 𝌆 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67869&edit=1

« previous php.bugs (#192731) next »