btpf / Alexandria

A minimalistic cross-platform eBook reader built with Tauri, Epub.js, and Typescript
GNU General Public License v3.0
2.18k stars 49 forks source link

Will you consider supporting Chinese books? #13

Closed cqjerry closed 1 year ago

cqjerry commented 1 year ago

Win 11, unable to open Chinese books in any format。 Snipaste_2023-09-04_12-11-28 Snipaste_2023-09-04_12-11-14

btpf commented 1 year ago

Hi, I am sorry you are facing problems. I cannot replicate the issue, so I will need logs from you. Please follow these instructions, that way I can get more information.

  1. Open the application
  2. press CTRL + SHIFT + i
  3. import the broken book
  4. Right click console and "save as" image

Please upload the log here. Thanks

cqjerry commented 1 year ago

When I import the book, the software quits automatically. tauri.localhost-1693808037079.log

sr79368142 commented 1 year ago

这些书籍是从当当网下载的吗?如果是从当当网下载的,可能是内容编辑上不符合epub规范,也可能是drm没有清理。我有一大批这个封面的电子书,都是从当当网下载的。不过好像用sumatrapdf就可以正常打开的。

cqjerry commented 1 year ago

不是当当网下载的,时Zlib上下载的,格式有azws mobi 等,暂时没试过epub格式。每次导入书的时候,程序都自动退出了。再次打开就是上面这个没有书封面的状态,也无法打开书籍阅读。

btpf commented 1 year ago

So there was a bug I discovered yesterday that would lead to similar behavior and could be related.

  1. Navigate to the book file
  2. delete the entire filename (To erase invisible characters)
  3. rename it with latin/english characters only with the .epub or .azw3 extension.

Then try to import it and tell me if it still crashes.

cqjerry commented 1 year ago

Nice , It 's working! Thank you!

btpf commented 1 year ago

Great! I think I know where the issue is located now. Ill try to develop & deploy a proper solution tomorrow if I have time. Thanks for reporting this issue. I will update here once ready for retesting.

sr79368142 commented 1 year ago

这个和语言没关系,我刚才解压了一本,看了一下内容,是加密的,在META-INF文件夹里有个encryption.xml文件。 如果不想解压的话,可以用sigil或者calibre自带的编辑器测试。 查了一下,epub标准里,epub支持XML加密,所以制作者通过添加一个encryption.xml文件就可以伪装成 DRM, 制作者只是在encryption.xml里随便写了个[加密算法]的信息,然而并不是真的用这个加密算法来加密了文件,目的只是为了阻止calibre或sigil这些能编辑epub的软件打开,但是用特定的阅读软件也是能打开的,所以不是真的DRM。 https://www.zhihu.com/question/399474287

btpf commented 1 year ago

Hi @cqjerry , Please test the latest version and tell me if issue is still present or if it is now working. Thanks! https://github.com/btpf/Alexandria/releases/tag/0.9.3

cqjerry commented 1 year ago

Thank you for your work, now is perfact!

cqjerry commented 1 year ago

Hi @cqjerry , Please test the latest version and tell me if issue is still present or if it is now working. Thanks! https://github.com/btpf/Alexandria/releases/tag/0.9.3

Sorry, new bug. when import file "TheEconomist.2023.09.02.epub", software quit again. I guess it still file name fault problem.

btpf commented 1 year ago

This might be because of the multiple dots. Ill give this a try now.

btpf commented 1 year ago

Hi @cqjerry , Please test the latest version and tell me if issue is still present or if it is now working. Thanks! https://github.com/btpf/Alexandria/releases/tag/0.9.3

Sorry, new bug. when import file "TheEconomist.2023.09.02.epub", software quit again. I guess it still file name fault problem.

Can you tell me the size of that file? I don't think this problem has anything to do with the filename this time.

I highly suspect the epub you have is corrupt. Can you try it in calibre and tell me if it is working?

cqjerry commented 1 year ago

Hi @cqjerry , Please test the latest version and tell me if issue is still present or if it is now working. Thanks! https://github.com/btpf/Alexandria/releases/tag/0.9.3

Sorry, new bug. when import file "TheEconomist.2023.09.02.epub", software quit again. I guess it still file name fault problem.

Can you tell me the size of that file? I don't think this problem has anything to do with the filename this time.

I highly suspect the epub you have is corrupt. Can you try it in calibre and tell me if it is working?

https://github.com/hehonghui/awesome-english-ebooks/tree/master/01_economist/te_2023.09.02 file location

btpf commented 1 year ago

This file downloaded multiple times incomplete. When it did download, and was 16.4MB on the filesystem, it opened fine. I will prevent crashing when importing corrupt epubs with the next version. It also seems like the image will stretch incorrectly in the library view. I will investigate this bug. Since this specific issue is solved, I will close now. Thanks!