Summary: | '%'-characters get doubled and hidden [patch] | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Florian Brunner <fbrunnerreg> |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED LATER | ||
Severity: | normal | CC: | grundleborg, jens-bugs.kde.org, mschiff |
Priority: | NOR | ||
Version: | 3.5 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Florian Brunner
2002-11-28 23:26:02 UTC
Subject: Re: New: '%'-characters get doubled and hidden On Thursday 28 November 2002 23:26, Florian Brunner wrote: > 1) on shell: touch 'test%%test.txt' -> 'ls' shows 'test%%test.txt', Konqueror shows 'test%test.txt' (single '%'-character) Right. Now try creating a file, in Konqueror, with a '/' in the name -> it will work, but the actual file will use %2f on disk. This "encoding" done at the Konqueror level allows this (and any other kind of future extensions) - meaning that _any_ character can be used in a filename, in KDE. (People running KDE on Windows might want to add something to handle ':' in KIO::encodeFileName/decodeFileName, for instance. ':' is no problem on Linux but is "forbidden" on Windows). It is of course an unwanted side effect of this, that a real file named a%%b will appear as a%b .... Historical note: back when each bookmark was a separate .desktop file, it was necessary to be able to use a '/' in a filename, this is when this encoding/decoding layer was added. > Note that it's possible that Konqueror shows 2 'test%test.txt': > One for 'test%%test.txt' and one for 'test%test.txt' (which has been created outside of Konqueror) Ouch, indeed. Never thought about that.... I see no way to "fix" this, however. Of course none of those problems happen to "end users" which only use KDE to create files.... *** Bug 70020 has been marked as a duplicate of this bug. *** I believe there is a solution. Please see my comment (#11) for a related problem http://bugs.kde.org/show_bug.cgi?id=53751 There I suggest to visually represent the fact that a string is URL-encoded, and to add a mechanism to toggle between encoded/decoded. confirming still an issue for 3.4.1 *** Bug 100516 has been marked as a duplicate of this bug. *** This bug is still there in 3.5.4 :-/ I vote for completely removing this filename "borking" as "/" is *not* an allowed character in filenames. And IMO i could be very confusing too: Imagine having a file named foo%2fbar.txt and a directory foo/ with a file in it called bar.txt ... If I type foo/bar.txt in some file open, save as dialog or even on konquis URL-bar ... which file will it choose to show me? cheers -Marc *** Bug 142195 has been marked as a duplicate of this bug. *** Sad to say this annoying bug is still present in KDE. 4.0.0. :-( There was just discussion going on about it, actually. After talking to David on irc he submitted a patch a little later. I guess that it will fix it. Filenames will not be encoded anymore. Slashes in filenames are still allowed but will we converted to a utf8 char named "Fraction slash" (QChar(0x2044)) See: http://lists.kde.org/?l=kfm-devel&m=120067470101987&w=2 Bug still present in 3.5.9, but fixed in svn trunk r803492. It looks like this is fixed in 4, so I'm closing. |