Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epub2txt: Can't open file '/tmp/epub2txt1356/OEBPS/33 - 副本.html' for reading: No such file or directory #27

Open
jackatls opened this issue Jun 11, 2023 · 3 comments

Comments

@jackatls
Copy link

jackatls commented Jun 11, 2023

when convert some files occurs this problem(lots of files can be converted correctly),it seems because that some spaces appear in the name of the html file which is created,but I don't know where to modify the this output filename,I have attempted to modify the tmp directory to my own temp dir but it doesn't work,I need your help sincerely,thanks a lot!

@jackatls jackatls changed the title epub2txt: Can't open file '/home/xacc/epub_dir/temp/epub2txt1356/OEBPS/33 - 副本.html' for reading: No such file or directory epub2txt: Can't open file '/tmp/epub2txt1356/OEBPS/33 - 副本.html' for reading: No such file or directory Jun 11, 2023
@jackatls
Copy link
Author

jackatls commented Jun 11, 2023

when convert some files occurs this problem(lots of files can be converted correctly),it seems because that some spaces appear in the name of the html file which is created,but I don't know where to modify the this output filename,I have attempted to modify the tmp directory to my own temp dir but it doesn't work,I need your help sincerely,thanks a lot!

I have solved this by modify it in the epub2txt.c:
run_command ((const char *[]){"unzip", "-O","CP936","-o", "-qq", file, "-d", tempdir,
NULL}, TRUE);
it is a encoding problem of unzip,I added -O CP936 to unzip correctly for chinese

@kevinboone
Copy link
Owner

Hi. I'm concerned that adding "-O CP936" will break things for other users. I wonder if there might be another way to solve the problem? Could you supply me with an epub file that shows the problem, so I can try to fix it?

@jackatls
Copy link
Author

jackatls commented Jun 11, 2023

Hi. I'm concerned that adding "-O CP936" will break things for other users. I wonder if there might be another way to solve the problem? Could you supply me with an epub file that shows the problem, so I can try to fix it?

thanks for your reply,you can download the epub here
link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants