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 decoding to UTF-8 #40

Merged
merged 1 commit into from
May 29, 2020

Conversation

aslehigh
Copy link
Contributor

Previously the data received back from running PDFtk was processed as a bytes object. I have converted it to a UTF-8 string in the run_command() function.

My primary motivation was to resolve a line splitting bug on the Windows platform (resolve issue #38). With this change, the data returned from PDFtk is handled consistently across platforms and can be correctly and consistently split into lines for further processing.

Several other changes were made to accommodate the data now being string objects, instead of bytes objects.

@aslehigh aslehigh changed the title Aslehigh text encoding Text decoding to UTF-8 May 26, 2020
@revolunet
Copy link
Owner

should this be rebased from master due to the test files change ?

@aslehigh
Copy link
Contributor Author

Yes, I can do that. Sorry, my workflow on this project was pretty messy. I'll do the same with #41 after this one is taken care of.

@aslehigh
Copy link
Contributor Author

Actually, my branch already includes the same commits as your master now does, since I had merged aslehigh-fix-tests into it. Does that take care of it for you?

Sorry, I've not used Github much and it's kind of confusing me!

@revolunet
Copy link
Owner

I'm wondering where are the good tests because now the master tests are red while those on this PR are ok ?

You could use git rebase to rework your local history and push-force the branch again. If not i'll "squash" the commits on merge no sorry.

@aslehigh aslehigh force-pushed the aslehigh-text-encoding branch from cd25aae to 9572282 Compare May 27, 2020 17:36
@aslehigh aslehigh force-pushed the aslehigh-text-encoding branch from 9572282 to 36793a8 Compare May 27, 2020 17:48
@aslehigh
Copy link
Contributor Author

Done. Thanks for the tip, I had never tried git rebase -i before.

I don't know what's wrong with the tests. If I checkout aslehigh-fix-tests on my computer the tests run fine on Python 2.7 and 3.7. (Actually, I don't understand why they were marked as passing before I started, because your original master was failing for me.)

@revolunet revolunet merged commit 6ddcc2e into revolunet:master May 29, 2020
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

Successfully merging this pull request may close these issues.

2 participants