[wp-trac] [WordPress Trac] #11175: wp_check_invalid_utf8() should drop invalid utf-8 chars only instead of truncating string

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 23 21:11:57 UTC 2009


#11175: wp_check_invalid_utf8() should drop invalid utf-8 chars only instead of
truncating string
--------------------------+-------------------------------------------------
 Reporter:  sirzooro      |       Owner:                  
     Type:  defect (bug)  |      Status:  new             
 Priority:  normal        |   Milestone:  2.9             
Component:  General       |     Version:  2.9             
 Severity:  normal        |    Keywords:  has-patch tested
--------------------------+-------------------------------------------------
Changes (by miqrogroove):

  * keywords:  has-patch needs-testing => has-patch tested


Comment:

 iconv and mb_convert_encoding behave identically.  Tested with various
 valid and invalid byte sequences.  These functions do not check for code
 point validity, but they do a good job of stripping individual bytes that
 fail to decode.

 Trivially noted disagreement with preg_match using invalid code points
 0xD800 and 0x140000.

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


More information about the wp-trac mailing list