Fixed!!! - Link to local file with spaces in path/file name. HowTo?

User avatar
Ovg
Posts: 127
Joined: Mon Feb 02, 2015 8:44 am
Contact:

Fixed!!! - Link to local file with spaces in path/file name. HowTo?

Postby Ovg » Thu Oct 08, 2015 1:49 pm

I want to add link to local file to Remark. It works fine if file path/name doesn't contains space(s). But I can't make link to file
with spaces in file/path name. HowTo? file://x:\xxxx%20xxxxxx.yyy doesn't works ....
Capture.PNG
Capture.PNG (6.57 KiB) Viewed 11819 times

Windows 7x64 SP1 CN 3.0
Last edited by Ovg on Sun Dec 13, 2015 9:14 am, edited 3 times in total.
It's impossible to lead us astray for we don't care even to choose the way.
CN 3.11 LifeTime Pro Licence / Windows 7 SP1 x64
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby usbpoweredfridge » Fri Oct 09, 2015 10:22 am

Hi Ovg,

The %20 not working may be a bug that has been introduced, because that is the official way to do it:
viewtopic.php?f=6&t=1239

However, %20 will still work in at least one situation - but I don't think it will work for you, as your folder path has the folder with the space as the very first folder. On my system, this works:
file:///c:\Users/Chris/Pictures/Screen%20Captures

Note that:
a. The first slash after the drive is a back slash, while all the other slashes are forward slashes;
b. The first folder does not have a space.

If I replace the forward slashes with back slashes, %20 does not work.

Now, if we use a path where the folder with the space is the first folder - such as in your example:
file:///D:/GOG.com%20Downloads
file:///D:\GOG.com%20Downloads

Neither of those actually work, as the slash after the drive letter must be a backslash - and %20 appears to break with backslashes.

tl;dr - I think this may be a bug. Alex will have to confirm this though - there may be a supported way to do this (it isn't listed in the help file though, I checked - I also tried the usual quoting characters, ie " ' <>).

Chris
User avatar
Ovg
Posts: 127
Joined: Mon Feb 02, 2015 8:44 am
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby Ovg » Fri Oct 09, 2015 10:42 am

Hi usbpoweredfridge!

Thank you for such full and clear answer! I have suspected that this may be bug ...

WBR, Oleg
It's impossible to lead us astray for we don't care even to choose the way.
CN 3.11 LifeTime Pro Licence / Windows 7 SP1 x64
User avatar
Ovg
Posts: 127
Joined: Mon Feb 02, 2015 8:44 am
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby Ovg » Fri Oct 09, 2015 3:37 pm

I have found a workaround:

I have created junction point to T:\My Documents:
mklink /j g:\My_Documents "t:\My Documents" and link file:///g:\My_documents/H323_1.doc works fine.
It's impossible to lead us astray for we don't care even to choose the way.
CN 3.11 LifeTime Pro Licence / Windows 7 SP1 x64
User avatar
CintaNotes Developer
Site Admin
Posts: 4739
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby CintaNotes Developer » Mon Oct 12, 2015 12:20 pm

Yes, this is a bug, thanks guys.
Will be fixed in the next update.

Another workaround would be to use the note body for this with the "Insert Link to File" command.
Alex
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby usbpoweredfridge » Sun Oct 18, 2015 8:32 am

Fixed in v3.01 Beta :)

Chris
User avatar
Ovg
Posts: 127
Joined: Mon Feb 02, 2015 8:44 am
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby Ovg » Sun Oct 18, 2015 2:42 pm

Many thanks! :-)
It's impossible to lead us astray for we don't care even to choose the way.
CN 3.11 LifeTime Pro Licence / Windows 7 SP1 x64
User avatar
Ovg
Posts: 127
Joined: Mon Feb 02, 2015 8:44 am
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby Ovg » Sat Oct 24, 2015 8:44 pm

I have found another issue with links. Links with '&' sign inside isn't recognizing by CN now, but if I change a few backslashes (\) before '&' sign to slashes (/) and then return them again to backslashes, it will.

PS All type of links are affected.

WBR, Oleg
Capture.png
Capture.png (12.1 KiB) Viewed 11690 times

Capture2.PNG
Capture2.PNG (16.5 KiB) Viewed 11689 times
It's impossible to lead us astray for we don't care even to choose the way.
CN 3.11 LifeTime Pro Licence / Windows 7 SP1 x64
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby usbpoweredfridge » Mon Oct 26, 2015 11:18 am

There are a number of characters affected - + for example (eg C:\TempFiles\Test+Test.txt is cut off at the first 'Test'). Alex will probably have to give some thought about what characters are allowed in Windows filenames - a question that is not as easy to answer as what you may think - and then go through and make sure all are covered.

Chris
User avatar
CintaNotes Developer
Site Admin
Posts: 4739
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby CintaNotes Developer » Wed Oct 28, 2015 12:11 pm

Thanks for the report guys, I'll check it out and fix in the next update.
Alex
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby usbpoweredfridge » Sat Nov 14, 2015 2:00 am

& and + fixed in 3.02 final :)

Chris
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Fixed!!! - Link to local file with spaces in path/file name. HowTo?

Postby usbpoweredfridge » Sat Dec 12, 2015 12:15 pm

Found another character that breaks the file link scheme - the comma. So this filename for example is not recognised:
Senator Heroically saves Obsolete Program, 20,000 Coincidental Jobs in his State.mp4

CN creates a link up to the first comma, and then stops.

Chris
User avatar
Ovg
Posts: 127
Joined: Mon Feb 02, 2015 8:44 am
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby Ovg » Sat Dec 12, 2015 12:32 pm

Also:

` $ { } =

WBR, Oleg
It's impossible to lead us astray for we don't care even to choose the way.
CN 3.11 LifeTime Pro Licence / Windows 7 SP1 x64
User avatar
CintaNotes Developer
Site Admin
Posts: 4739
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby CintaNotes Developer » Sun Dec 13, 2015 8:45 am

You should use the percent encoding for such filenames.
Alex
User avatar
usbpoweredfridge
Posts: 407
Joined: Fri Jan 17, 2014 11:08 pm
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby usbpoweredfridge » Sun Dec 13, 2015 8:57 am

I sorta figured that would be the answer, was just hoping it may have been added natively alongside the + sign :) For anyone wondering, here are the official URI encodings:
http://www.w3schools.com/tags/ref_urlencode.asp

Comma is %2C for example, so my example filename will be:
Senator%20Heroically%20saves%20Obsolete%20Program%2C%2020%2C000%20Coincidental%20Jobs%20in%20his%20State.mp4

I know at one point in time, I had a program installed that could decode these characters (handy for pasting in a encoded URL to get the more plain language version of it), but I'm not aware of one that goes back the other way. There is probably an obscure website somewhere where you can paste filenames to be encoded though.

Chris
User avatar
Ovg
Posts: 127
Joined: Mon Feb 02, 2015 8:44 am
Contact:

Re: Link to local file with spaces in path/file name. HowTo?

Postby Ovg » Sun Dec 13, 2015 9:13 am

Alex, Chris!

Many thanks for suggestions!!! :mrgreen:

WBR, Oleg
It's impossible to lead us astray for we don't care even to choose the way.
CN 3.11 LifeTime Pro Licence / Windows 7 SP1 x64

Return to “CintaNotes Personal Notes Manager”