[Poppler-bugs] [Bug 55977] handling of rtl text inversion is too naive

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Nov 18 06:27:56 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=55977

Khaled Hosny <khaledhosny at eglug.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |khaledhosny at eglug.org

--- Comment #56 from Khaled Hosny <khaledhosny at eglug.org> ---
Created attachment 119906
  --> https://bugs.freedesktop.org/attachment.cgi?id=119906&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20151118/e5655c32/attachment.html>


More information about the Poppler-bugs mailing list