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
getttext defaults with unicode #36692
Comments
When using gettext, and a token is not translated, for
example:
print _('Foo')
the output will be 'Foo', as expected.
However, if that entry is:
print _(u'Foo')
we get:
Traceback (most recent call last):
File "./translation.py", line 12, in ?
print _(u'Foo')
File "/usr/lib/python2.2/gettext.py", line 195, in
ugettext
return unicode(tmsg, self._charset)
TypeError: decoding Unicode is not supported |
Logged In: YES I'm not sure this is a bug: they keys in a message catalog |
Logged In: YES Barry will know what to do... |
Logged In: YES I agree with Martin, you shouldn't be passing unicode |
Logged In: YES I will shortly post a patch that clarifies the documentation |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: