-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Translate unicode #901
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
Translate unicode #901
Conversation
f50574d
to
bc4f12f
Compare
translate/cloud-client/snippets.py
Outdated
@@ -1,4 +1,6 @@ | |||
#!/usr/bin/env python | |||
# -*- coding: iso-8859-15 -*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to specify an encoding in this file.
translate/cloud-client/snippets.py
Outdated
from google.cloud import translate | ||
from six import python_2_unicode_compatible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no, not this. If text
comes from the command line you should just be able to do text.encode('utf-8')
. You' won't even have to reference the specific type (bytes/str).
@dpebot will you merge when travis passes? |
Okay! I'll merge when all statuses are green and all reviewers approve. |
No description provided.