#18004: Django should not use `force_unicode(..., errors='replace')` when
parsing
POST data.
-------------------------------------+-------------------------------------
Reporter: mrmachine | Owner: aaugustin
Type: Bug | Status: assigned
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: post data unicode | Triage Stage: Design
utf8 encode decode transaction | decision needed
aborted | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by mrmachine):
I'm not sure how relevant this is, but I found a reference online to IE
being buggy with regard to encoding filenames in multipart/form data.
http://lists.evolt.org/archive/Week-of-Mon-20100524/130378.html
The MSDN link in that post seems to be dead now, but the author mentions
that it said IE would guess when not specified.
The linked w3schools page indicates that the default value for the `<form
accept-charset="UNKNOWN">` attribute is `UNKNOWN`, which means the
encoding equals the encoding of the document that contains the form.
http://www.w3schools.com/tags/att_form_accept_charset.asp
The linked sitepoint page says that all versions of IE (only goes up to 8)
are buggy, and that IE will happily send data encoded as `Windows-1252` if
the attribute is specified as `ISO-8859-1`. Not sure if this is just one
example of buggy behaviour, or the only example.
http://reference.sitepoint.com/html/form/accept-charset
aaugustin, do you have any objection to the proposal of attempting to
decode strictly, and marking the data as dirty if strict encoding fails
and falling back to the current behaviour, so that developers can choose
how to deal with this either in their own view code or middleware?
--
Ticket URL: <https://code.djangoproject.com/ticket/18004#comment:13>
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].
For more options, visit https://groups.google.com/groups/opt_out.