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

Python3 unicode #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

MaxKurama
Copy link

In python3 we do not have unicode strings, so we do not need to decode them.

In python3 we do not have unicode strings, so we do not need to decode them.
@pwaller
Copy link
Contributor

pwaller commented Aug 26, 2016

This fix is not quite right and will make successful running conditional on the system configuration.

A better fix would be to specify the encoding on the NamedTemporaryFile(*, encoding="utf-8"). Then rather than trying to .decode you can instead just get rid of the .decode. This will then work correctly on both python 2 & 3 and independently of system configuration variables such as LC_CTYPE and PYTHONIOENCODING.

@pwaller pwaller mentioned this pull request Aug 26, 2016
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