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

Python 3 uses a different integer division operator and different default encoding #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

levitation
Copy link

@levitation levitation commented Feb 1, 2023

Replaced /= with //= to avoid errors on the line self.word_document.seek(fc_fc). Python 3 uses floating point division by default with the /= operator, but we need an integer data type.

Additionally, Python 2.x uses ASCII as a default encoding, but Python 3.3+ uses UTF-8 default encoding. Therefore we need to specify the cp1252 file encoding explicitly.

@levitation levitation changed the title Python 3 uses a different integer division operator Python 3 uses a different integer division operator and different default encoding Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant