pyfilesystem2
pyfilesystem2 copied to clipboard
Support windows File URI
This issue is derived from #330
Windows File URI spec is explained here: https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/
Reference implementation is done in C# by Microsoft in 2003: https://referencesource.microsoft.com/#System/net/System/UriExt.cs,1
Failed attempts:
- used urllib's quote,
- use urllib.request.pathname2url
Both failed respect this spec:
Incorrect: file:///C:/example%E3%84%93.txt
Correct: file:///C:/exampleㄓ.txt
Even when this issue is resolved, python file system2 needs to overcome #341 to consume File URI
Just as a point of reference: Seems even QT and libcurl have trouble agreeing on what a file URL should look like!
https://github.com/raspberrypi/rpi-imager/commit/71eefa47cf3708371f7489d7faecabf49b707c8b