Bug 345512

Summary: Hebrew text is recognized using selection tool with wrong direction
Product: [Applications] okular Reporter: oren.ginger
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: aacid
Priority: NOR    
Version: 0.20.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: The PDF document with hebrew text

Description oren.ginger 2015-03-25 13:16:16 UTC
When I tried to copy some text from PDF in Hebrew language (which is written right-to-left), I saw that the symbols in clipboard were written in incorrect direction (left-to-right, like English)

Likely, this bug can be also reproduced with other RTL languages (as Arabic).

Reproducible: Always

Steps to Reproduce:
1. Open the PDF file with Hebrew text in Okular
2. Select some characters using Selection tool
3. In context menu choose Text (N characters) - copy to clipboard
4. Paste copied text into some text editor

Actual Results:  
Pasted text is reversed.
For example, if you copied "שלום עולם" you will see "םלוע םולש"

Expected Results:  
Exactly the selected text should be pasted.

To make your life easier, I created an appropriate PDF file and uploaded it to google drive. https://drive.google.com/file/d/0B9y8M5LJCyb2YmR3dHFFX1R1TWc/view?usp=sharing
Comment 1 oren.ginger 2015-03-25 13:17:38 UTC
Created attachment 91734 [details]
The PDF document with hebrew text

For testing, I prepared this file, so you don't have to set up Hebrew layout.
Comment 2 Albert Astals Cid 2015-03-25 21:02:15 UTC

*** This bug has been marked as a duplicate of bug 184399 ***