#31344: Django raises UnicodeEncodeError when there is a cookie with a non-latin
character
-----------------------------------------+------------------------
               Reporter:  ozgurakcali    |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  HTTP handling  |        Version:  2.2
               Severity:  Normal         |       Keywords:  cookie
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 I know non-latin characters are not suggested to be used in cookies, but
 when one such cookie is sent with a request, django raises a
 UnicodeEncodeError. It is raised on get_bytes_from_wsgi method of wsgi.py,
 on the following line:

 return value.encode('iso-8859-1')

 Not sure how this should be handled, 'ignore' could bu supplied as the
 second parameter to encode method, but that would change the value of the
 cookie silently, and I'm not sure if that would be a desired behavior.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31344>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.a6cc29cd4954844001de1e7da0060e9d%40djangoproject.com.

Reply via email to