#30324: UnicodeDecodeError when loading debug templates.
-------------------------------------+-------------------------------------
     Reporter:  chihun-jang          |                    Owner:  Nick Pope
         Type:  Bug                  |                   Status:  assigned
    Component:  Error reporting      |                  Version:  2.2
     Severity:  Normal               |               Resolution:
     Keywords:  runserver,           |             Triage Stage:  Accepted
  UnicodeDecodeError,                |
  cp949,template,technical_500       |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Nick Pope):

 * owner:  chihun-jang => Nick Pope
 * has_patch:  0 => 1
 * easy:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 The issue here is that reading the various debug templates was changed in
 
[https://github.com/django/django/commit/ea542a9c7239b5b665797b7c809f1aceb0b412cf
 ea542a9] to bypass the template loaders. The template loaders use the
 encoding specified on the template engine which is utf-8 by default. Later
 in
 
[https://github.com/django/django/commit/50b8493581fea3d7137dd8db33bac7008868d23a
 50b8493] an ellipsis was added and this caused things to blow up on
 Windows as `locale.getpreferredencoding(False)` is not utf-8.

 Here is an alternative [https://github.com/django/django/pull/11170 PR]
 that adds tests and a release note for 2.2.1 as this is a regression.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30324#comment:4>
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/069.2cde018900facecca65ee5a4a9a56350%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to