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

From: Date: Wed, 20 Aug 2014 08:00:29 +0000
Subject: Bug #67869 [NEW]: FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187191@lists.php.net to get a copy of this message
From: heurika at gmail dot com Operating system: Debian 7 PHP version: 5.5.15 Package: Filter related Bug Type: Bug Bug description:FILTER_SANITIZE_FULL_SPECIAL_CHARS returns MB4-Chars incorrectly 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 bug report at https://bugs.php.net/bug.php?id=67869&edit=1 --

« previous php.bugs (#187191) next »