Bug 91635 - files with "?" in the filename can't be opened
Summary: files with "?" in the filename can't be opened
Status: RESOLVED FIXED
Alias: None
Product: khexedit
Classification: Applications
Component: general (show other bugs)
Version: 0.8.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Espen Sand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-19 01:01 UTC by Andreas Pietzowski
Modified: 2004-11-14 03:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Pietzowski 2004-10-19 01:01:28 UTC
Version:           0.8.5 (using KDE 3.3.1, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.4-52-default

I wanted to open a file with a "?" in the filename. KHexEdit told me (by mistake) that this file doens't exist although I opened it with with rightclick in konqueror.

Should be an easy-to-resolve bug...

Nice app anyway - no such app under windows ;-)
Pietz
Comment 1 Friedrich W. H. Kossebau 2004-10-21 01:13:27 UTC
"?" in filenames are not to be expected, I think, because the shell allows "?" to be used as regexp for any letter in a filename (like in "ls files.?pp"). "?" are also used for unknown char codes in a filename (happens when mounting filesystems with the wrong charset). Perhaps the file was created on a filesystem with iso-xxxx-15 but mounted with utf8 or viceversa?

Greetings 
Friedrich
Comment 2 Andreas Pietzowski 2004-10-21 14:07:54 UTC
IIRC I learned in school that you can use ANY character for any filename in a UNIX operating system. Also every application works with "?" but not KHexedit. Should be fixed. Really. It is in deed a valid character for a filename. The shell is just another application who has it's own rules. But you can also open a file in the shell with this command:

type my\ filename\ has\ a\ \? \inside.txt

or

type 'my filename has a ? inside.txt'

If the shell can handle this, KHexedit should handle it also without any probs ;-)

Bye
Pietz
Comment 3 Friedrich W. H. Kossebau 2004-11-14 03:13:58 UTC
CVS commit by kossebau: 

Backport from HEAD:
files with "?" and else in the filename can now be opened also when given as
app parameters

BUG:91635


  M +1 -1      khexedit.desktop   1.263.2.2
  M +2 -4      main.cc   1.21.2.1


--- kdeutils/khexedit/main.cc  #1.21:1.21.2.1
@@ -98,7 +98,5 @@ int main( int argc, char **argv )
     
     for(int i = 0; i < args->count(); i++)
-    {
-       hexEdit->addStartupFile( QFile::decodeName(args->arg(i)) );
-    }
+       hexEdit->addStartupFile( args->url(i).url() );
 
     args->clear();

--- kdeutils/khexedit/khexedit.desktop  #1.263.2.1:1.263.2.2
@@ -67,5 +67,5 @@
 Name[ven]=U sengulusa ha KHex
 Name[zh_TW]=KHex編輯器
-Exec=khexedit -caption "%c" %i %m %f
+Exec=khexedit -caption "%c" %i %m %U
 TerminalOptions=
 Icon=khexedit