Re: urllib.parser.quote() and RFC 2396: unreserved characters get encoded

2015-02-11 Thread dieter
Bruno Cauet writes: > Unicode characters outside the ASCII range also get encoded when they > have no reason to, e.g. >>>> pathlib.PurePath("/home/싸이/").as_uri() >'file:///home/%EC%8B%B8%EC%9D%B4' Non-ASCII characters are not legal uri characters. Look at section 2.3 of "http://www.faqs.o

urllib.parser.quote() and RFC 2396: unreserved characters get encoded

2015-02-11 Thread Bruno Cauet
Hi, I believe that pathlib and urllib.parse.quote() do not correctly build URIs. According to RFC 2396 (http://tools.ietf.org/html/rfc2396.html), unreserved characters such as "!" should not be escaped (section 2.3): Unreserved characters can be escaped without changing the semantics of the U