#46028 [NEW]: improve htmlentities to encode really every code
From: nobs at nobswolf dot info
Operating system:
PHP version: 5.2.6
PHP Bug Type: Feature/Change Request
Bug description: improve htmlentities to encode really every code
Description:
------------
Please give htmlentities an option to encode all codes that are not ASCII
even if numerical encoding is needed.
Maybe the option could be a "accepted base encoding" like:
string htmlentities ( string $string [, int $quote_style [, string
$charset [, bool $double_encode [, string $base_charset ]]]] )
Reproduce code:
---------------
Having a generated page that needs to stay in latin-1 encoding because it
is part of a bigger project, you want to include some dynamic content in
cyrilic (e.g. from user input encoded in UTF-8).
Expected result:
----------------
encode all non-ASCII and non-character-entity-characters as something like
Ӓ
Actual result:
--------------
they left untouched which gives encoding errors
--
Edit bug report at http://bugs.php.net/?id=46028&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46028&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46028&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46028&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46028&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=46028&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46028&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46028&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46028&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46028&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46028&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46028&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46028&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46028&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46028&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46028&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46028&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46028&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46028&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46028&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46028&r=mysqlcfg
Thread (1 message)
- nobs at nobswolf dot info