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

text files with utf-8 fails #14

Open
olabri opened this issue Mar 24, 2021 · 2 comments
Open

text files with utf-8 fails #14

olabri opened this issue Mar 24, 2021 · 2 comments

Comments

@olabri
Copy link

olabri commented Mar 24, 2021

Hi we (University of Bergen) have a problem with your otherwise excellent app. If we try to view a text file with utf-8 encoding, the preview seems to be in ISO format. We have tried to debug the code a bit, but areunfortunatly not fluid enough in rails.

For instance
https://pdf.uib.no/viewer?url=http://gutenberg.org/files/43724/43724-0.txt
is garbled, but
https://pdf.uib.no/viewer?url=http://gutenberg.org/files/43724/43724-h/43724-h.htm
is not:

@olabri olabri changed the title text files with uft-8 fails text files with utf-8 fails Mar 24, 2021
@olabri
Copy link
Author

olabri commented Mar 24, 2021

but your seems to work: https://docview.sfu.ca/viewer?url=http://gutenberg.org/files/43724/43724-0.txt so it might be a config issue

@va7map
Copy link
Member

va7map commented Mar 29, 2021

Could be. All Predoc really does is pass the file path to Docsplit.extract_pdf. The actual conversion is done by LibreOffice. Maybe try running this and see if the output is also garbled?

libreoffice --headless --invisible  --norestore --nolockcheck --convert-to pdf 43724-0.txt

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