Edit report at https://bugs.php.net/bug.php?id=61354&edit=1
ID: 61354
User updated by: hufeng1987 at gmail dot com
Reported by: hufeng1987 at gmail dot com
Summary: htmlentities and htmlspecialchars doesn't respect
the default_charset
Status: Not a bug
Type: Bug
Package: Strings related
Operating System: Linux/Windows/
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
Please fix it as soon as possible.
Previous Comments:
------------------------------------------------------------------------
[2013-01-05 03:53:35] leaflet at leafok dot com
I am facing the same problem.
After upgrading to PHP 5.4.10 in the product environment, all the GB2312
encoding data on the page became blank. This badly influenced the whole site.
It is undoubtedly a backward compatible issue. Wish it could be resolved soon.
------------------------------------------------------------------------
[2012-12-28 17:36:29] rudibr at gmail dot com
This is a serious backward incompatibility (and not even listed as such).
I am also not able to upgrade to 5.4 because of this, and have advised all of
my
clients which I provide server consulting to do not upgrade as well.
No defaults of any kind should be changed arbitrarily , without notice and
without
possibility of customization. It breaks code, and makes everyone affected very
uneasy on any future relases.
Like all here I hope this get the serious attention it should have gotten
already.
------------------------------------------------------------------------
[2012-11-28 09:28:16] x dot bazilio at gmail dot com
This is a bug.
Just upgraded php and got empty string on many projects.
I cant't change code in CMS, because i am not a developer of CMS. I am using
CMS
fore develop web sites.
------------------------------------------------------------------------
[2012-08-27 17:04:46] goodwaiter at gmail dot com
because use htmlspecialchars($text,NULL,""); can make works fine;
so php Developer can fix this bug in this easy way:
just make "omitted encoding" works like encoding with "", and all things will
be
ok.
------------------------------------------------------------------------
[2012-08-27 16:37:32] goodwaiter at gmail dot com
another fix way in code is that:
use htmlspecialchars($text,NULL,"")
not need to add "utf8" "cp936", or other in "", just leave "" blank, it will
use
the current page's encoding like no this bug.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=61354
--
Edit this bug report at https://bugs.php.net/bug.php?id=61354&edit=1