RAR, a file with '?' char in name => extraction fails.

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

RAR, a file with '?' char in name => extraction fails.

Post by *m^2 »

I have TC configured to use external rar.exe. Recently I got an archive (a Linux one?) where the first file had '?' in the name. When I try to extract it with RAR, it reports error, but fails over by replacing it with '_', then continues extraction.
TC doesn't notice the failover and just stops as if the archive was broken.

Sorry, I can't post the archive.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Windows doesn't support filenames with '?' in names.

'?' and '*' chars in Windows are mask-defining chars.

Maybe your '?' is just some Unicode char that you see as '?'? So your non-Unicode program won't handle it anyway. Just try to rename file and all should work fine.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Yes, I know that '?' is not allowed Windows' file names, that's why I suggested that it might be a Linux file.
I unpacked the archive using rar alone, (and rar renamed it) but I think that TC should be able to handle such situations itself.

Sorry if what I write isn't clear.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

If your rar.exe is non-Unicode, it can't operate with non-Unicode characters. I think TC can't do something here.
Which RAR version did you use for unpacking - console or GUI?
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Console. But it's not related to Unicode. Just an hour ago I found another archive with similar, yet different issue - there were files in a subdirectory, which name ended with ' ' (space).
Again, rar dealt with it by replacing ' ' with '_', but TC cancelled extraction.

And BTW, IIRC rar supports Unicode.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48096
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I have no direct control on unpacking RAR files - it's handled by unrar.dll provided by the RAR author. For external unpacking, you may try using winrar.exe instead of rar.exe, it may be able to unpack the file.
Author of Total Commander
https://www.ghisler.com
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

RAR can unpack such files. And does so, but returns error code because it has to use FS workarounds. At this point, TC stops extraction, though it should continue and just warn user at the end.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48096
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I see - any idea what error code is returned?
Author of Total Commander
https://www.ghisler.com
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

I don't know. Sadly, I don't have access to the archives anymore. :(
If I see another one, I'll check it.

But you can try to create one under Linux.
Post Reply