I am encountering the following problem in the latest version of Scrivener.
If I add a link of the type file which contains spaces file:////file space name.pdf then the context menu Copy Link will replace the space by %20.
As a result I can’t use the copied link file:////file%20 name.pdf e.g. to open the file in Finder.
For web-links the behaviour is correct but for file links it is a problem. In my eyes the copy link for files should result in a path without replacing any spaces by %20.
Any help to workaround this problem is appreciated.
It’s still a URI, simply one that uses the file: protocol instead of the http: protocol. The URI/URL encoding standard specifies that spaces be replaced the with %20 sequence (“escaping” them and other problematic characters) so that the spaces don’t interfere with the parsing of the complete URI.
If I have file:///C:/temp/Test%20Folder/New%20Text%20Document.txt as my URI, you know the complete path start to finish, and it’s up to the resource that is interpreting the URI to correctly de-escape as required.
If I have file:///C:/temp/Test Folder/New Text Document.txt how is the parser supposed to know where the URI is complete? Since a space character can be a delimiter…