TC9.0 Final: Chinese file name in zip file garbled
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 5
- Joined: 2016-12-08, 04:05 UTC
TC9.0 Final: Chinese file name in zip file garbled
When I compress files into a zip file, some file names with Chinese characters '硕' and '学' are garbled.
How can I resove it?
How can I resove it?
-
- Junior Member
- Posts: 5
- Joined: 2016-12-08, 04:05 UTC
If I decompress the ZIP file in the Windows Explorer, all the filenames are OK. If I decompress it in TC, some filenames containing Chinese characters are garbled while some other filenames also containing Chinese characters are OK.hlloyge wrote:Encode filenames in ZIP to Unicode?
Change font?
If I use the option 'All as UTF-8 if at least one contains characters>127', all the filenames are OK in TC. But in the Windows Explorer, all Chinese characters are garbled and only a part of the files can be decompressed.
My operating system is Win7 x64.
- ghisler(Author)
- Site Admin
- Posts: 50909
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Total Commander follows the original ZIP standard by pkzip, which uses the OEM/DOS charset for file names. I guess that the program which created your ZIP uses the Windows charset, but didn't set Windows as the creating operating system. Then the names will be wrong. Sorry, I don't plan to change that.
Explorer does not support the Unicode flag. But you can put the Unicode name in the extra field to keep compatibility with Explorer.
Btw, is this the same in TC 8.52a?
Edit: I just switched to Chinese (main land) locale and packed file 硕学.txt with ZIP in Total Commander. The file appears fine in the ZIP. Which program did you use to create the zip?
Explorer does not support the Unicode flag. But you can put the Unicode name in the extra field to keep compatibility with Explorer.
Btw, is this the same in TC 8.52a?
Edit: I just switched to Chinese (main land) locale and packed file 硕学.txt with ZIP in Total Commander. The file appears fine in the ZIP. Which program did you use to create the zip?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 5
- Joined: 2016-12-08, 04:05 UTC
- ghisler(Author)
- Site Admin
- Posts: 50909
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I don't see a difference between TC 8.52a and TC 9.0. Could you send me two very small zip files to support at ghisler dot com, one created with TC 8.52a and one with TC 9.0?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Junior Member
- Posts: 5
- Joined: 2016-12-08, 04:05 UTC
- ghisler(Author)
- Site Admin
- Posts: 50909
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thanks for the files. They are identical, so the problem isn't with creation, but with unpacking.
I found out that the following bugfix causes the problem:
12.12.16 Fixed: Disabled the fix "Support invalid ZIP archives with UTF-8-encoded names but missing UTF-8 flag (created by Dropbox)" ony systems with double byte charset like Chinese, because some valid Chinese characters would be detected as UTF-8 (32/64)
The characters you list also represent valid UTF-8 codes, so they are recognized as UTF-8 by mistake. I will turn off automatic UTF-8 detection for multi-byte languages. Too bad for Dropbox that they can't read the ZIP standard...
I found out that the following bugfix causes the problem:
12.12.16 Fixed: Disabled the fix "Support invalid ZIP archives with UTF-8-encoded names but missing UTF-8 flag (created by Dropbox)" ony systems with double byte charset like Chinese, because some valid Chinese characters would be detected as UTF-8 (32/64)
The characters you list also represent valid UTF-8 codes, so they are recognized as UTF-8 by mistake. I will turn off automatic UTF-8 detection for multi-byte languages. Too bad for Dropbox that they can't read the ZIP standard...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com