mirror of https://github.com/koreader/koreader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5709b4c2f1
Previously getTextFromBoxes would just pass the first and last three
bytes of the current and previous words when trying to detect CJK
characters (which shouldn't have spaces inserted).
However, this handling was not correct because CJK characters can be
longer than 3 bytes, and internally BaseUtil.utf8charcode doesn't ensure
that it was only given a single utf8 character (it blindly does the bit
operations on whatever length code you give it).
As a result, before this patch selections in PDF documents would have
lots of spaces stripped because getTextFromBoxes would think that almost
all characters were CJK characters.
Fixes:
|
3 years ago | |
---|---|---|
.. | ||
canvascontext.lua | 3 years ago | |
credocument.lua | 3 years ago | |
djvudocument.lua | 3 years ago | |
doccache.lua | 3 years ago | |
document.lua | 3 years ago | |
documentregistry.lua | 3 years ago | |
koptinterface.lua | 3 years ago | |
pdfdocument.lua | 3 years ago | |
picdocument.lua | 3 years ago | |
tilecacheitem.lua | 3 years ago |