[wp-trac] [WordPress Trac] #15652: Tags with Accents are Incorrectly Sorted in Cloud

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 3 21:56:48 UTC 2010


#15652: Tags with Accents are Incorrectly Sorted in Cloud
-------------------------+--------------------------------------------------
 Reporter:  CatherineBr  |       Owner:                               
     Type:  enhancement  |      Status:  new                          
 Priority:  normal       |   Milestone:  Future Release               
Component:  I18N         |     Version:  3.0.2                        
 Severity:  normal       |    Keywords:  sorting, sort, accents, cloud
-------------------------+--------------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:6 CatherineBr]:
 > So, couldn't WordPress read that WPLANG constant, and modify the sorting
 accordingly ? This is beyond my competence, but I found a PHP code that
 seems to do that, using the "Collator" class :

 Sadly not. Setting locale at the PHP level is not thread safe in PHP at
 the time of writing this. So it's generally not acceptable for hosts to
 allow end users to tweat the setting. In other words, either we implement
 UTF-8 collation rules in WP (which is insanely complex, since it depends
 on heaps of things) or we've to deal with things as they're returned by
 strnatcasecmp(), which is acceptable for English but, as you point out,
 has a few issues with other locale.

 I'm attaching a few PostgreSQL functions in case there's interest in
 trying to work around this at the MySQL level.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15652#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list