[wp-trac] [WordPress Trac] #19033: Problem with Hebrew letter "Nun" hiding search results

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 2 04:15:13 UTC 2011


#19033: Problem with Hebrew letter "Nun" hiding search results
----------------------------------------+----------------------------------
 Reporter:  shirgans                    |       Owner:  shir.gans@…
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  3.3
Component:  Charset                     |     Version:  3.2.1
 Severity:  critical                    |  Resolution:
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+----------------------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch => has-patch needs-unit-tests
 * milestone:  Awaiting Review => 3.3


Comment:

 Looks like this has to do with `\s` in the regexp, similarly to #11528 and
 [12501].

 To reproduce:
 {{{
 preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', 'נתן, קושניר,
 אנטולי', $matches);
 var_dump($matches);
 }}}

 Here's what I get on PHP 5.2.14 (Windows), PCRE 8.02 2010-03-19:
 {{{
 array(3) {
   [0]=>
   array(6) {
     [0]=>
     string(1) "�"
     [1]=>
     string(4) "תן"
     [2]=>
     string(7) "קוש�"
     [3]=>
     string(4) "יר"
     [4]=>
     string(3) "א�"
     [5]=>
     string(8) "טולי"
   }
   ...
 }
 }}}
 With the regexp from the patch:
 {{{
 array(3) {
   [0]=>
   array(3) {
     [0]=>
     string(6) "נתן"
     [1]=>
     string(12) "קושניר"
     [2]=>
     string(12) "אנטולי"
   }
   ...
 }
 }}}

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


More information about the wp-trac mailing list