-
Notifications
You must be signed in to change notification settings - Fork 265
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
embed_file() fails tests on Windows for text files #515
Comments
Thank you for reporting this @gmischler |
I have just tested this under Windows and those tests pass for me:
I think this has more to do with To avoid this kind of environment-dependent issues, we could adopt a .gitattributes file in this repository, that would ensure all text files are checked out with LF line endings and not CRLF |
Ah yes, setting it to "input" and refetching the branch fixes it.
That would definitively be a good idea. 👍 |
@Lucas-C , after this reconfiguration, Desktop Github now shows me the "tutorial/tuto[2-7].html" files as changed, presumably because they are stored in the repository with CRLF file endings. Might want to fix that for consistency. |
Thanks for the notice, done! |
Error details
Those test cases that embed a text file fail, because the data are stored with
\n\r
line endings there. Since they are read in binary mode, the resulting PDF is different from the stored one.Minimal code
$> pylint -k test_embed
Environment
fpdf2
HEADNot sure if the difference has any practical consequences, or what the best solution would be. Maybe
embed_file()
needs a flag for reading text files in text mode.The text was updated successfully, but these errors were encountered: