<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:khaledhosny@eglug.org" title="Khaled Hosny <khaledhosny@eglug.org>"> <span class="fn">Khaled Hosny</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - handling of rtl text inversion is too naive"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=55977">bug 55977</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>khaledhosny@eglug.org
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - handling of rtl text inversion is too naive"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=55977#c56">Comment # 56</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - handling of rtl text inversion is too naive"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=55977">bug 55977</a>
              from <span class="vcard"><a class="email" href="mailto:khaledhosny@eglug.org" title="Khaled Hosny <khaledhosny@eglug.org>"> <span class="fn">Khaled Hosny</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=119906" name="attach_119906" title="Handle right-to-left text in search">attachment 119906</a> <a href="attachment.cgi?id=119906&action=edit" title="Handle right-to-left text in search">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=55977&attachment=119906'>[review]</a>
Handle right-to-left text in search

I think there are two different issues here; 1) Searching RTL text does not
work 2) the “algorithm” used to fix RTL text in text dumping might be too
simplistic.

I think 1) is the more pressing issue and it can be reasonably fixed without
introducing any new dependencies at all, as we can simply reuse the existing
text dumping code.

2) might benefit from using ICU, and I just noticed today mirrored characters
(like brackets) are not reversed back. But that a far minor issue that no
search working at all.

I’m attaching a patch that fixes just 1), based slightly on the latest attached
patch, but without all the ICU stuff and with providing a reorderText()
function similar to the non-ICU dumpReorderedText(). There is code duplication
here that I don’t feel easy about, but trying to use one function for both
cases results on lots of if conditions that makes the resulting code very
unreadable, so I’m not sure which is better.

I think this patch can go on, while the merits of introducing a huge dependency
like ICU for such a minor gain is assessed.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>