Bug #61116 [Opn->Csd]: HTML functions use encoding, not charset

From: Date: Sun, 19 Apr 2015 03:46:31 +0000
Subject: Bug #61116 [Opn->Csd]: HTML functions use encoding, not charset
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192195@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61116&edit=1 ID: 61116 Updated by: stas@php.net Reported by: vrana@php.net Summary: HTML functions use encoding, not charset -Status: Open +Status: Closed Type: Bug Package: Strings related Operating System: Irrelevant PHP Version: trunk-SVN-2012-02-16 (SVN) -Assigned To: +Assigned To: stas Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2012-02-16 23:54:21] vrana@php.net The following patch has been added/updated: Patch Name: php-src Revision: 1329436461 URL: https://bugs.php.net/patch-display.php?bug=61116&patch=php-src&revision=1329436461 ------------------------------------------------------------------------ [2012-02-16 23:54:14] vrana@php.net Description: ------------ HTML functions use encoding, not charset. E.g. ISO-8859-1 is both character set and encoding but UTF-8 is encoding of Unicode character set. There's also missing arg_info in get_html_translation_table(). I've already fixed Manual. Test script: --------------- Reflection::export(new ReflectionFunction('htmlspecialchars')); Reflection::export(new ReflectionFunction('get_html_translation_table')); Expected result: ---------------- Function [ <internal:standard> function htmlspecialchars ] { - Parameters [4] { Parameter #0 [ <required> $string ] Parameter #1 [ <optional> $quote_style ] Parameter #2 [ <optional> $encoding ] Parameter #3 [ <optional> $double_encode ] } } Function [ <internal:standard> function get_html_translation_table ] { - Parameters [2] { Parameter #0 [ <optional> $table ] Parameter #1 [ <optional> $quote_style ] Parameter #2 [ <optional> $encoding ] } } Actual result: -------------- Function [ <internal:standard> function htmlspecialchars ] { - Parameters [4] { Parameter #0 [ <required> $string ] Parameter #1 [ <optional> $quote_style ] Parameter #2 [ <optional> $charset ] Parameter #3 [ <optional> $double_encode ] } } Function [ <internal:standard> function get_html_translation_table ] { - Parameters [2] { Parameter #0 [ <optional> $table ] Parameter #1 [ <optional> $quote_style ] } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61116&edit=1

« previous php.bugs (#192195) next »