Damaged tree inside of .zip in Chinese locale Windows 7 RC

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
skuzi
Junior Member
Junior Member
Posts: 16
Joined: 2009-05-24, 04:27 UTC

Damaged tree inside of .zip in Chinese locale Windows 7 RC

Post by *skuzi »

I made following:
1. Under russian locale created folder (level 1) with cyrillic name.
2. Inside of folder level 1 created some subfolders (level 2).
3. Inside of folder level 1 created some files (level 2).
4. Packed folder level 1 with TC' internal packer to zip (ticked two first options in dialog window).
5. Changed locale to chinese, restarted.
6. Opened this zip file with TC' internal unpacker.

Bugs:
1. Existing (default) option is "Ask every time a Unicode name is encountered". There were no question when packing "Store all names with non-English characters in extra field?" there. I thought TC will show option dialog. Or this option doesn't apply to cyrillic characters?

2. When I opened zip file under chinese locale, tree were shown incorrectly, e.g. files & folders level 2 were shown beside folder level 1 (moved one level up). WinRAR 3.90 beta 2 shown this .zip correctly.
Here is screenshot (330 KB):
http://img41.imageshack.us/img41/6571/totalcmdchineselocalezi.png
Windows Explorer shown empty file :shock:

3. These files & folders level 2 even changed their names. I can understand this for cyrillic names, but english names were changed as well!

P.S. I have RAR files with same problems, but failed to reproduce by myself.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, this is normal behaviour and due to the defficiencies of the ZIP file format. There is nothing I can do about it.

Let me explain: ZIP was invented in the good old days of DOS. So by default, it uses the DOS (ASCII) character set of the current locale. For maximum compatibility, TC uses this charset too. Now when you create a zip in one locale (Russian) and then open it in another locale, the names will be broken.

So if you want to send someone with different locale settings a zip with non-English characters, you will need to choose one of the Unicode settings. Unfortunately very few unzippers support Unicode yet, so you will have to choose between maximum compatibility within one locale, and Unicode support between locales.

Btw, the names are incorrect both in TC and WinRAR. Since Chinese uses 2 bytes for chinese characters, the slash for folders can be the second byte of such a 2 byte name, resulting in the names in TC.
Author of Total Commander
https://www.ghisler.com
skuzi
Junior Member
Junior Member
Posts: 16
Joined: 2009-05-24, 04:27 UTC

Post by *skuzi »

Thank you for explanation regarding ZIP: I got, nowdays it's nearly useless. There is free 7z, there is incredible WinRAR...

But still:

1. There should be dialog windows with option to choose from if ticked "Ask every time a Unicode name is encountered". Or default option should be changed.
2. Understood with slash. But WinRAR treats file path correctly!
3. This, I guess, is the result of previous problem.

Solution I can suggest is not to modify in any way special symbols like "dots", "slashes", "backslashes" etc.

P.S. For WTH anybody needs Zipper/Unzipper while he can use TC?
Beside crosplatforming conversations...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

There is no right or wrong way in this case. The only solution would be to let the user choose the encoding, just as for ftp or my new sftp plugin...
Author of Total Commander
https://www.ghisler.com
Post Reply