Bug 128609

Summary: hebrew words search in reverse letter order fromm the quick search bar
Product: [Unmaintained] kpdf Reporter: Nadav Kavalerchik <nadavkav>
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: emilsedgh, gangleri, kde-2011.08, munzirtaha
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 156380    

Description Nadav Kavalerchik 2006-06-04 11:17:21 UTC
Version:           0.5.2 (using KDE 3.5.2-6 Red Hat, Red Hat Linux (Bordeaux))
Compiler:          Target: i386-redhat-linux
OS:                Linux (i686) release 2.6.16-1.2080_2.rhfc5.cubbi_suspend2

typing Hebrew words in the quick search bar returns pages that contain reverse order letters of the searched word.

example (in English): search for FOOD returns pages with DOOF in them.

the Hebrew language has a Visual and Standard font encoding which reverse order the word's letters in a document. maybe it's searching a document without regarding the doc's encoding. not sure, thu.

here is a link to an Hebrew PDF sample doc:
http://www.sviva.gov.il/Enviroment/Static/Binaries/Articals/recycle_list_1.pdf

kindly,
nadav :-)
Comment 1 Thiago Macieira 2006-06-10 21:43:51 UTC
PDF has no such thing as encoding. There's just "a bunch of glyphs" positioned somewhere in the page. If the document was written backwards without regards for directionality of the flow, it's the document creator's fault.

It could happen to LTR languages as well.

However, Copy & Paste from the document yielded proper text, so it at least looks like to be respecting the flow.
Comment 2 Nadav Kavalerchik 2006-06-11 12:17:39 UTC
thanks for the info. (you open my eyes)
i think we should close this issue.
Comment 3 Thiago Macieira 2006-06-11 13:18:48 UTC
Considering Copy & Paste worked, let's wait for Albert to take a look.
Comment 4 Albert Astals Cid 2006-06-13 08:52:48 UTC
Give me some time, things are sidetracking me lately
Comment 5 Albert Astals Cid 2006-09-26 11:48:44 UTC
Seems we should revert the string we pass to the internals in case of RTL languages, but the problem is that i do not know how to ask a qlineedit if the text it has is rtl or ltr :-(
Comment 6 Albert Astals Cid 2006-09-26 11:57:08 UTC
*** Bug 125310 has been marked as a duplicate of this bug. ***
Comment 7 Diego Iastrubni 2007-12-14 11:32:28 UTC
PDF stores the text in Visual Hebrew, and not Logical. This is why you need to search the text in "reverse mode". We can apply some ugly hacks (like saving the text as ISO8859-8 to get it in visual mode).

Nadav, this is not something trivial.
Comment 8 Nadav Kavalerchik 2007-12-14 13:24:55 UTC
thanks diego for clarifying this for me :-)
Comment 9 Diego Iastrubni 2008-08-13 09:45:02 UTC
*** Bug 156380 has been marked as a duplicate of this bug. ***
Comment 10 Diego Iastrubni 2008-08-13 09:45:14 UTC
*** Bug 165804 has been marked as a duplicate of this bug. ***
Comment 11 Munzir Taha 2008-11-10 14:45:20 UTC
I am facing these problems with Arabic, too. I cannot search. I cannot copy and paste in a proper way. Things are reversed. It's also not a limitation in the PDF because Adobe Acrobat works great. I tested acroread in Intrepid and it works.
Comment 12 Dotan Cohen 2009-04-27 22:39:20 UTC
I can confirm this bug in Okular from KDE 4.2.2 when testing with the file provided in the OP. However, Adobe Reader 9 for Linux has the correct search behaviour when opening the same file. So at least Adobe found a workaround.
Comment 13 Albert Astals Cid 2015-02-07 16:22:07 UTC
Thank you for your bug report or feature suggestion.

The "KPDF" application is no longer maintained, and all tickets are now closed.

We recommend to switch to the "Okular" application.

Due to the high number of bugs/suggestions in "KPDF" we are not able to go through all of them and verify if they are still valid in "Okular".

That's why are we asking you to help us by checking if your bug/suggestion is still valid in Okular and if it still is opening a new bug/suggestion against it.

Thank you for your effort in making KDE better :)

(This is an automatic message from the KDE bug triaging team)