﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20108	filepath_to_uri raises UnicodeDecodeError on utf8 input	Ivan Virabyan	nobody	"The docs say ""The path is assumed to be either UTF-8 or unicode."" in [https://docs.djangoproject.com/en/1.5/ref/utils/#django.utils.encoding.filepath_to_uri]:
 
{{{
>>> filepath_to_uri('тест')
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""/home/kanobu/env/lib/python2.7/site-packages/django/utils/encoding.py"", line 235, in filepath_to_uri
    return quote(force_bytes(path.replace(""\\"", ""/"")), safe=b""/~!*()'"")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
}}}

Since the module {{{ django.utils.encoding }}} uses unicode literals, code {{{ path.replace(""\"", ""/"") }}} fails, because it tries to decode `path`"	Bug	closed	Utilities	1.5	Normal	fixed			Accepted	1	0	0	0	1	0
