From:             psc at webcraft dot ch
Operating system: Debian Lenny
PHP version:      5.2.10
PHP Bug Type:     Strings related
Bug description:  mb_convert_encoding doesn't understand hexadecimal 
html-entities

Description:
------------
When converting a hexadecimal html entity to UTF-8 with
mb_convert_encoding, it get's converted to a broken unicode character
(displayed in firefox as a small square). 

Reproduce code:
---------------
$v_html = "š";
echo $v_html;
echo mb_convert_encoding($v_html, 'UTF-8', 'HTML-ENTITIES');
echo html_entity_decode($v_html, ENT_COMPAT, 'UTF-8');

Expected result:
----------------
I'd expect it to output three times the same character, š.

At first as hexadecimal html entity, then two times in UTF-8.

ššš

Actual result:
--------------
š[something broken]š

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

Reply via email to