On 18 December 2012 09:34, Aymeric Augustin <
aymeric.augus...@polytechnique.org> wrote:

> (complete version follows)
>
> Hello,
>
> I'm looking for some feedback on #19468 before making a decision. It's one
> of the tickets that currently block the 1.5 release.
>
> Here's a summary of the problem.
>
> Django must decode environ['PATH_INFO'] to obtain request.path, where
> decoding means :
>   1 - URL-decoding to a bytestring
>   2 - "charset-decoding" to an unicode string
>
> The question is : which charset should be used in step 2?
> settings.DEFAULT_CHARSET or utf-8 (hardcoded)?
>
>
I wonder if  UTF-8 with "surrogates escape" error mode makes sense here.
Python 3 uses it for decoding file-system paths, where it's not always
possible to determine the charset.  I think it's pretty much the same case.
After all, the %-coded bytes can be some binary data that's not possible to
reasonably decode with any charset.


-- 
Łukasz Rekucki

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to