wustho / epr

CLI Epub Reader
MIT License
1.2k stars 49 forks source link

阅读中文epub,丢失字符修改办法 #63

Closed kai0200 closed 7 months ago

kai0200 commented 8 months ago

行 844 src_lines, imgs = parser.get_lines(width // 2) 修改后,显示完整。

shuu3 commented 7 months ago

Your solution indeed enables proper display of Chinese characters in EPUB files, without losing any characters that exceed the maximum width that can be displayed.

However, the side effect is that, it also results in the content of English EPUB files only occupying the left half of the terminal, leaving the other half blank and wasted.

To cater to both the old and new issues, copy epr.py to a new file, modify the new file by dividing the width by 2 as your solution, and use this new file exclusively for reading EPUB files with Chinese characters (and I assume all CJK characters are the same here). Noting that replacing certain "epr" strings within the new file to match the file names is required.

It is also stated that Chinese are not supported presently in the README.md

kai0200 commented 7 months ago

Thanks