#47433 [NEW]: signature of htmlentities-function does only work with all 3 parameters

From: Date: Wed, 18 Feb 2009 07:54:59 +0000
Subject: #47433 [NEW]: signature of htmlentities-function does only work with all 3 parameters
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1896@lists.php.net to get a copy of this message
From:             mbeiser at w-commerce dot de
Operating system: Debian Etch
PHP version:      5.2CVS-2009-02-18 (CVS)
PHP Bug Type:     *Languages/Translation
Bug description:  signature of htmlentities-function does only work with all 3 parameters

Description:
------------
With the PHP Version 5.2.0 there comes a charset-problem concerning the
htmlentities-function. While it has worked under PHP4 (setting up the
parameters using htaccess), we can't manage to use a htmlentities-function
without setting up the charset(UTF-8) with the third parameter. 

This was tested under Debian Etch13, Ubuntu LTS 8.04 with the PHP Versions
5.2.0 and 5.2.8.

Reproduce code:
---------------
<?php

$text = "Text mit Umlauten: ä ü ö";

echo "htmlentities without exp. charset and htaccess:".htmlentities($text,
ENT_COMPAT)."\n";
echo "htmlentities utf-8     :".htmlentities($text, ENT_COMPAT,
'utf-8')."\n";

?>

Expected result:
----------------
htmlentities without exp. charset and htaccess: Text mit Umlauten: ä ü
ö

htmlentities uf8       : Text mit Umlauten: ä ü ö


Actual result:
--------------
htmlentities without exp. charset and htaccess: Text mit Umlauten: ä
ü ö

htmlentities uf8       : Text mit Umlauten: ä ü ö


-- 
Edit bug report at http://bugs.php.net/?id=47433&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        http://bugs.php.net/fix.php?id=47433&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        http://bugs.php.net/fix.php?id=47433&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        http://bugs.php.net/fix.php?id=47433&r=trysnapshot60
Fixed in CVS:                        http://bugs.php.net/fix.php?id=47433&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47433&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=47433&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=47433&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=47433&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=47433&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=47433&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=47433&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=47433&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=47433&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=47433&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47433&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47433&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=47433&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=47433&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=47433&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=47433&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=47433&r=mysqlcfg



Thread (2 messages)

« previous php.doc.bugs (#1896) next »