From:             
Operating system: OSX (though probably all)
PHP version:      5.3.8
Package:          Unicode Engine related
Bug Type:         Bug
Bug description:UTF-8 functions doesn't respect unicode equivalence

Description:
------------
Quote from http://en.wikipedia.org/wiki/Unicode_equivalence:

"...the code point U+006E (the Latin lowercase 'n') followed by U+0303 (the
combining tilde '◌̃') is defined by Unicode to be canonically equivalent
to the single code point U+00F1 (the lowercase letter 'ñ' of the Spanish
alphabet). Therefore, those sequences should be displayed in the same
manner, should be treated in the same way by applications such as
alphabetizing names or searching, and may be substituted for each other."

It might be this is more a case of just documenting that the unicode
functions don't support unicode equivalence (for completeness).

Test script:
---------------
echo "Output recorded from a terminal interpreting UTF-8\n\n";

var_dump("\x6e\xcc\x83");
var_dump(utf8_encode("\xf1"));

var_dump(utf8_decode("\x6e\xcc\x83") == "\xf1");
var_dump(mb_convert_encoding("\x6e\xcc\x83", "ISO-8859-1", "UTF-8") ==
"\xf1");


Expected result:
----------------
Output recorded from a terminal interpreting UTF-8

string(3) "ñ"
string(2) "ñ"
bool(true)
bool(true)

Actual result:
--------------
Output recorded from a terminal interpreting UTF-8

string(3) "ñ"
string(2) "ñ"
bool(false)
bool(false)

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

Reply via email to