php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49412 htmlspecialchars(): Add note that most charsets don't make any difference
Submitted: 2009-08-29 22:16 UTC Modified: 2009-09-30 07:17 UTC
From: thomas at landauer dot at Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
 [2009-08-29 22:16 UTC] thomas at landauer dot at
Description:
------------
From the 12 charsets listed in the htmlspecialchars() documentation, the following 7 are equivalent:
*) ISO-8859-1
*) ISO-8859-15
*) UTF-8
*) cp866
*) cp1251
*) cp1252
*) KOI8-R
Reason: The five characters affected by htmlspecialchars() [& < > " '] are all on the same position in these charsets. So for most people, the charset parameter is totally irrelevant.

My suggestion: Include a note about this fact under the charset table.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-30 19:31 UTC] jani@php.net
There is no such OS called "All".
 [2009-09-30 07:17 UTC] svn@php.net
Automatic comment from SVN on behalf of torben
Revision: http://svn.php.net/viewvc/?view=revision&revision=288982
Log: Note that several charsets are effectively equivalent as far as
htmlspecialchars() is concerned.
Addresses bug #49412.
 [2009-09-30 07:17 UTC] torben@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 23:00:01 2026 UTC