- From: Yoh Deadfall <notifications@github.com>
- Date: Sun, 29 Jun 2025 16:29:25 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/issues/873/3017270725@github.com>
YohDeadfall left a comment (whatwg/url#873) @mertcanaltin, if you need a reference on how Windows handles path to URL conversion then there's `UrlCreateFromPath` introduced in 2006 and explained well by Dave Risney in [File URIs in Windows](https://learn.microsoft.com/en-us/archive/blogs/ie/file-uris-in-windows). Though, the most interesting part here: > A large set of invalid file URIs come from the common but incorrect notion that it’s acceptable to place a Windows file path after the text ‘file://’ and call it a file URI. This is bad because Windows file paths, as mentioned earlier, may contain characters that aren’t allowed in URIs or that are important to the parsing of URIs. For instance, if a ‘#’ is in a Windows file path and that Windows file path is simply appended to the text ‘file://’ then we can’t know if the ‘#’ is supposed to be part of the path or if its supposed to delimit the fragment as it would in an actual URI. Similarly, if the path contains a ‘%’ then we can’t determine whether the ‘%’ identifies a percent-encoded octet, or if it is just a plain percent character in the Windows file path. Zeke Odins-Lucas wrote an informative and entertaining [blog post](https://web.archive.org/web/20130116070556/http://blogs.msdn.com/b/freeassociations/archive/2005/05/19/420059.aspx) on this topic. The link to Zeke's post is updated to point to it in the archive.org. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/873#issuecomment-3017270725 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/issues/873/3017270725@github.com>
Received on Sunday, 29 June 2025 23:29:29 UTC