[wp-trac] [WordPress Trac] #18625: term_exists() doesn't make a difference between z and ẓ

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 9 15:31:22 UTC 2011


#18625: term_exists() doesn't make a difference between z and ẓ
--------------------------------+------------------------------
 Reporter:  abdessamad idrissi  |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Taxonomy            |     Version:  3.2.1
 Severity:  normal              |  Resolution:
 Keywords:                      |
--------------------------------+------------------------------

Comment (by SergeyBiryukov):

 This depends on the MySQL collation indeed. I've modified the example from
 the link given my xknown above, to make it more clear.

 To reproduce in MySQL:
 {{{
 SET NAMES utf8;
 CREATE TABLE utf8_general_test ( c CHAR(10) ) CHARACTER SET utf8 COLLATE
 utf8_general_ci;
 CREATE TABLE utf8_bin_test (  c CHAR(10) ) CHARACTER SET utf8 COLLATE
 utf8_bin;

 INSERT INTO utf8_general_test VALUES ('shd'), ('ṣḥḍ');
 INSERT INTO utf8_bin_test VALUES ('shd'), ('ṣḥḍ');
 }}}
 Now
 {{{
 SELECT * FROM utf8_general_test WHERE c = 'ṣḥḍ';
 }}}
 will return both values, whereas
 {{{
 SELECT * FROM utf8_bin_test WHERE c = 'ṣḥḍ';
 }}}
 will return only one.

 I've tried to put
 {{{
 define('DB_COLLATE', 'utf8_bin');
 }}}
 to `wp-config.php` and reinstall !WordPress (to create new tables in
 `utf8_bin`). After that (and changing `$alphabet` to `$characters`), your
 example works fine.

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


More information about the wp-trac mailing list