diff options
| author | Marti Raudsepp <marti@voicecom.ee> | 2015-11-09 15:58:24 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-11-11 08:56:10 -0500 |
| commit | d3e3703a15cd9d294406121bc43be0c75b1a4e0e (patch) | |
| tree | 6debab91c30e7d5e5addf24660f7d5245e73cb2b /django/utils/translation/trans_real.py | |
| parent | 4c593eaa5f6767ac56a677299c984ee46c88a2cb (diff) | |
Fixed #25720 -- Made gettext() return bytestring on Python 2 if input is bytestring.
This is consistent with the behavior of Django 1.7.x and earlier.
Diffstat (limited to 'django/utils/translation/trans_real.py')
| -rw-r--r-- | django/utils/translation/trans_real.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 918d1842ee..6c6fe6d2f2 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -103,6 +103,7 @@ class DjangoTranslation(gettext_module.GNUTranslations): def __init__(self, language): """Create a GNUTranslations() using many locale directories""" gettext_module.GNUTranslations.__init__(self) + self.set_output_charset('utf-8') # For Python 2 gettext() (#25720) self.__language = language self.__to_language = to_language(language) |
