Req #61396 [NEW]: this bug does not depend on operating system and other properties of environmen
| From: | iblacksmoke at gmail dot com | Date: | Thu, 15 Mar 2012 05:27:12 +0000 |
| Subject: | Req #61396 [NEW]: this bug does not depend on operating system and other properties of environmen | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-168484@lists.php.net to get a copy of this message | ||
From:
Operating system: doesn't matter
PHP version: 5.4.0
Package: Unicode Engine related
Bug Type: Feature/Change Request
Bug description:this bug does not depend on operating system and other properties of environmen
Description:
------------
Function htmlspecialchars does not have compatibility with all scripts in
non-unicode charset, because it uses the default utf-8 encoding instead of
the settings(php.ini). It's not a bug, but not quite logical behavior.
--------------
I'm sorry, I not have opportunity to create patch differences, because I do
not have necessary software on my netbook. I hope, this guide will help
you: http://pastebin.com/qCXNWxRh
Test script:
---------------
ini_set('default_charset','windows-1251');
echo htmlspecialchars('<h1>пÑÐ¸Ð²ÐµÑ Ð¼Ð¸Ñ</h1>');
Expected result:
----------------
<h1>пÑÐ¸Ð²ÐµÑ Ð¼Ð¸Ñ</h1>
Actual result:
--------------
null string
--
Edit bug report at https://bugs.php.net/bug.php?id=61396&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61396&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61396&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61396&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=61396&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61396&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=61396&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=61396&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=61396&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=61396&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=61396&r=support
Expected behavior: https://bugs.php.net/fix.php?id=61396&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=61396&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=61396&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=61396&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61396&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61396&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=61396&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=61396&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=61396&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=61396&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=61396&r=mysqlcfg