[Django] #28701: QueryDict processes some Unicode symbols incorrectly

3 views
Skip to first unread message

Django

unread,
Oct 11, 2017, 11:43:48 AM10/11/17
to django-...@googlegroups.com
#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.

Django

unread,
Oct 11, 2017, 2:48:32 PM10/11/17
to django-...@googlegroups.com
#28701: QueryDict processes some Unicode symbols incorrectly
------------------------------------+--------------------------------------

Reporter: fresheed | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 1.8
Severity: Normal | Resolution:
Keywords: QueryDict, Unicode | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------

Comment (by Tim Graham):

On Django master with Python 3 (Python 2 is no longer supported there),
the output is:
{{{
value=%C2%AB -> <QueryDict: {'value': ['«']}>
value=%D1%91 -> <QueryDict: {'value': ['ё']}>
value=%E3%82%A1 -> <QueryDict: {'value': ['ァ']}>
}}}
It looks like that's correct behavior? If so, we can most likely close the
issue. Per our [https://docs.djangoproject.com/en/dev/internals/release-
process/#supported-versions supported versions policy], 1.8 is only
receiving security and data loss fixes.

--
Ticket URL: <https://code.djangoproject.com/ticket/28701#comment:1>

Django

unread,
Oct 12, 2017, 7:32:01 AM10/12/17
to django-...@googlegroups.com
#28701: QueryDict processes some Unicode symbols incorrectly
------------------------------------+--------------------------------------

Reporter: fresheed | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 1.8
Severity: Normal | Resolution:
Keywords: QueryDict, Unicode | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------

Comment (by fresheed):

Ok, we'll move on to newer Django release

--
Ticket URL: <https://code.djangoproject.com/ticket/28701#comment:2>

Django

unread,
Oct 12, 2017, 7:32:59 AM10/12/17
to django-...@googlegroups.com
#28701: QueryDict processes some Unicode symbols incorrectly
------------------------------------+--------------------------------------
Reporter: fresheed | Owner: nobody
Type: Bug | Status: closed

Component: HTTP handling | Version: 1.8
Severity: Normal | Resolution: wontfix
Keywords: QueryDict, Unicode | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------
Changes (by fresheed):

* status: new => closed
* resolution: => wontfix


--
Ticket URL: <https://code.djangoproject.com/ticket/28701#comment:3>

Reply all
Reply to author
Forward
0 new messages