Bug 456902

Summary: epub: does not select the last character in a line in Chinese
Product: [Applications] okular Reporter: kittiereimersgzi64
Component: EPub backendAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: normal CC: aacid
Priority: NOR    
Version First Reported In: 22.04.3   
Target Milestone: ---   
Platform: unspecified   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Demo

Description kittiereimersgzi64 2022-07-19 10:01:03 UTC
SUMMARY
Okular can not select the last character in a line in Chinese
Here is an example image: https://www.imagebam.com/view/MEBRIJ4
This is an epub book that can be used as an example: https://en.jp1lib.org/book/15645661/134d13

STEPS TO REPRODUCE
1. Open an EPUB file with Chinese characters.
2. Use box selection or text selection to select any line that ends in Chinese.

OBSERVED RESULT
The last Chinese character at the end of the selected line is missing and seems to have become a space.

EXPECTED RESULT
The Chinese characters at the end should be able to be selected.

Okular 22.04.3 on Windows10 22H2
Comment 1 kittiereimersgzi64 2022-07-19 10:14:53 UTC
Created attachment 150733 [details]
Demo
Comment 2 Albert Astals Cid 2022-07-21 22:42:55 UTC
It's not windows only.

As an example on the given file, go to page 25.

Try to select the last 2 characters of the first line and the first of the second. There's only 2 characters selected, the last of the first line is ignored.