#9 URLs of local files - spaces

open
nobody
None
5
2008-06-25
2008-06-25
Daniel Polansky
No

The URLs of local files should be stored as the user entered them, including spaces, instead of converting the spaces into "%20".

Spaces are kept in FreeMind 0.8.0, and of 0.9.0 beta 17. Spaces are replaced with "%20" in FreeMind 0.9.0 beta 18. This change in IMHO a regression, a step back.

The behavior required by me causes no technical difficulties AFAIK.

Example: The address "C:\Users\Dan Polansky\Documents" should remain as it is, instead of being converted to "C:\Users\Dan%20Polansky\Documents".

Model applications: (a) OOo Writer and (b) MS Word do keep the spaces in the paths to local files, in align with the behavior required by me.

Discussion

  • Logged In: YES
    user_id=2162398
    Originator: NO

    The way Freemind 0.9.0 beta 19 handles spaces in addresses does not work on Windows XP network for folders that start with double backslash ("\\"). As a quick fix I added 3 lines to freemind\freemind\main\FreeMind.java after Dan's fix
    // bug fix by Dan:
    command = "rundll32 url.dll,FileProtocolHandler "+ url.toString();
    // bug fix by Nik:
    if (System.getProperty("os.name").startsWith("Windows XP")) && url.toString().startsWith("file:////"))
    command = "rundll32 shell32.dll,ShellExec_RunDLL " +
    url.toString().replaceAll("%20"," ").replaceAll("%25", "%");
    This works for all possible "%" and " " combinations in native Windows folder names, e.g., \\Dan'sPC\C$\Users\Dan Polansky\New Folder%20 (1).
    It also correctly treats 'My Documents' and 'My%20Documents' as two different folders on a remote computer.