[wp-trac] [WordPress Trac] #18606: wp_insert_term and wp_create_category fail on diacritics names

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 7 01:50:46 UTC 2011


#18606: wp_insert_term and wp_create_category fail on diacritics names
--------------------------------+-------------------------
 Reporter:  abdessamad idrissi  |       Owner:
     Type:  defect (bug)        |      Status:  closed
 Priority:  normal              |   Milestone:
Component:  Taxonomy            |     Version:  3.2.1
 Severity:  major               |  Resolution:  worksforme
 Keywords:  close               |
--------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  new => closed
 * resolution:   => worksforme
 * milestone:  Awaiting Review =>


Comment:

 Replying to [comment:1 johnbillion]:
 > If I understand correctly, you're doing this programatically, in which
 case it won't work because Ḍ is not an ASCII character and is therefore
 illegal in a PHP file.

 UTF-8 strings are perfectly valid in PHP files, as long as the file is
 saved in UTF-8.

 Replying to [ticket:18606 abdessamad idrissi]:
 > using either wp_insert_term or wp_create_category, an HTML entity
 representing the character must be given;

 I've just tried to run your examples on 3.3-trunk, and they work fine.
 Make sure your PHP file is saved in UTF-8 (without byte order mark).

 Note that you need to specify taxonomy for `wp_insert_term()`:
 {{{
 wp_insert_term( 'Ḍ', 'category' );
 }}}

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


More information about the wp-trac mailing list