Message251226
| Author |
serhiy.storchaka |
| Recipients |
Arfrever, martin.panter, orsenthil, serhiy.storchaka, vstinner |
| Date |
2015年09月21日.13:37:34 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1442842656.34.0.749769588877.issue25184@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
We could use url = urllib.parse.quote_from_bytes(os.fsencode(path)) on Posix systems, but I heart that on Windows os.fsencode() can irreversible spoil file names (replace unencodable characters with '?'). On other side, I'm not sure that Windows unicode path can't contain lone surrogates. In this case we should use the 'surrogatepass' error handler (at least it allow to restore the path in principle).
Here is a patch that tries to handle undecodable and unencodable paths. Need to test it on Windows. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年09月21日 13:37:36 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, orsenthil, vstinner, Arfrever, martin.panter |
| 2015年09月21日 13:37:36 | serhiy.storchaka | set | messageid: <1442842656.34.0.749769588877.issue25184@psf.upfronthosting.co.za> |
| 2015年09月21日 13:37:36 | serhiy.storchaka | link | issue25184 messages |
| 2015年09月21日 13:37:36 | serhiy.storchaka | create |
|