Rename file inside ZIP got the name broken for Explorer

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Rename file inside ZIP got the name broken for Explorer

Post by *DrShark »

This error happens with ZipUnicode=5 in [Packer] section of wincmd.ini and affects the file name look in Windows Explorer. In TC file name still looks correct.
TC 8.52a 32 bit, Windows Vista 32 bit Rus.

To reproduce:

1. Having above mentioned setting in wincmd.ini, pack test empty file with cyrillic name inside zip archive. Our example name:
ц

2. Open zip archive in Windows Explorer, you'll see that the name inside archive is correct. Close archive in Explorer.

3. In TC, rename our file inside archive from ц to цц

4. Open the archive Explorer again, you will see:
ЎЎ

5. The second iteration of the bug: make new archive in TC, now with the file ЎЎ inside of it.

6. Again in TC rename the file inside archive,
now from ЎЎ to ЎЎЎ.

7. Re-open archive in Explorer: the name of the file inside archive will be:
ббб

Note 1: rename bug applies only to the file we rename, other filenames inside archive still correct in Windows Explorer.
Note 2: it seems that the bug doesn't appear if only basic latin characters (English alphabet, numbers, some special characters) used within rename operation: the initial file name and its new name should only contain these characters.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Re: Rename file inside ZIP got the name broken for Explorer

Post by *karlchen »

DrShark wrote:This error happens with ZipUnicode=5 in [Packer] section of wincmd.ini and affects the file name look in Windows Explorer.
Hm. I have been using ZipUnicode=3 in the [Packer] section of wincmd.ini ever since the parameter was implemented and never noticed any problems.
Perhaps worth a try.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

DrShark,
There is no standard Unicode support in ZIP format so different programs use different ways of storing Unicode characters in names (e.g. by storing UTF-8 characters in name field where ASCII encoding is expected by the standard or by storing UTF-8 names in additional fields).
Since TC supports multiple ways, you should select one that is compatible with Explorer (but it may be incompatible with some other software).
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

ZipUnicode=5 mode gives maximum compatibility between TC and Explorer for me, see http://ghisler.ch/board/viewtopic.php?t=43016. When TC creates archive, all names are correct, so TC certainly knows how to store the names in ZipUnicode=5 mode. The problem happens when TC renames the file in existing archive. I hope Christian will find the solution, especially since zip format is extendable so it's possible by any software, including TC, to add some bit on archive creation to store the information about creation mode (file names format).
Last edited by DrShark on 2016-03-24, 10:46 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please send me a problematic ZIP (before renaming and after renaming).
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Mail with the subject buggy zip files sent to support email.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

In TC 9.00a renaming inside zip is fixed (now cyrillic names in Explorer are also correct). Of course this only applies to archives that don't yet have insde files with cyrillic names that already renamed in TC 8.x.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply