Better solution for allowing slash in filenames

Mark Rose kde at markrose.ca
Fri Jan 18 17:07:40 GMT 2008


A corner case that is encountered. I have ended up with files named like that 
when using wget, etc., though I can't say I've ever copy & pasted the 
filename into a browser. Would this also not make typing the filename on the 
command line difficult? As a KDE and command line user, I know it would 
confuse me when typing \/ (escaping with a backslash) and the file wasn't 
referenced.

Mark

On Friday 18 January 2008 9:44:14 am David Faure wrote:
> KDE 3.x and KDE 4.0 allow slashes in filenames by encoding them as %2F (and
> % as %%), a nice trick by Torben in KDE-1, but which leads to unexpected
> behavior (like "foo%" and "foo%%" both showing up as "foo%" in konqueror,
> the real path and the visible filename being different, etc).
>
> I found a much better solution to allow '/' without all this escaping:
> using a unicode character that looks like a slash but that isn't '/':
> QChar(0x2044), also known as "FRACTION SLASH". Looks quite nice IMHO:
> http://web.davidfaure.fr/kde/slash.jpg
>
> Ah... of course there's one downside: if you name a file
> "http://www.kde.org" you can't copy paste that name into the webbrowser as
> a URL, since the slashes are not real slashes anymore. Oh well, corner case
> of the corner case...






More information about the kfm-devel mailing list