#28701: QueryDict processes some Unicode symbols incorrectly
-------------------------------------+-------------------------------------
Reporter: fresheed | Owner: nobody
Type: Bug | Status: new
Component: HTTP | Version: 1.8
handling |
Severity: Normal | Keywords: QueryDict, Unicode
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Using Django 1.8 I get strange result feeding QueryDict a string which
contains Unicode U+00AB symbol. More concrete, first of two bytes is
omitted.
Other randomly taken symbols are parsed correctly.
{{{
double_angle="value=%C2%AB" # «
yo="value=%D1%91" # ё
katakana="value=%E3%82%A1" # ァ
for qs in (double_angle, yo, katakana):
dct=QueryDict(query_string=qs, encoding=None)
print("%s -> %s" % (qs, dct))
}}}
Output:
{{{
value=%C2%AB -> <QueryDict: {u'value': [u'\xab']}>
value=%D1%91 -> <QueryDict: {u'value': [u'\u0451']}>
value=%E3%82%A1 -> <QueryDict: {u'value': [u'\u30a1']}>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28701>
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.8f1ce001764a3869a6aa0f02696d5668%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.