#27811: Avoid UnicodeEncodeError during generation of email with mail_admins
logger
-------------------------------------------+------------------------
Reporter: ahumbert | Owner: (none)
Type: Bug | Status: new
Component: Error reporting | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
When using localization (USE_L10N = True), generated message for mails
triggered by the mail_admins logger may contains some non-ascii characters
depending on current locale.
This is the case for the display of server_time if current locale is
french :
In django.views.debug.py, the TECHNICAL_500_TEXT_TEMPLATE contains
`Server time: {{server_time|date:"r"}}`
which results, for example, in the following unicode string, for a french
locale :
lun, 6 Fév 2017 15:15:32 +0100
A solution would be to use a locale independant format (as suggested by
the use_l10n=False defined in Context object created at
ExceptionReporter.get_traceback_text), such as "c" format.
--
Ticket URL: <https://code.djangoproject.com/ticket/27811>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.17187cfcc158b17bdf68e760f5997e51%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.