How can I change name-encoding opening a zip file?
Moderators: Hacker, petermad, Stefan2, white
How can I change name-encoding opening a zip file?
I tried to open a zip file in Total Commander.
It showed unreadable codes.
Image: http://www.myungsuk.com/font.png
I tried the winrar software and changed the name-encoding to Korean and it worked.
Image: http://www.myungsuk.com/font2.png
Is there a I can do that in Total Commander?
It showed unreadable codes.
Image: http://www.myungsuk.com/font.png
I tried the winrar software and changed the name-encoding to Korean and it worked.
Image: http://www.myungsuk.com/font2.png
Is there a I can do that in Total Commander?
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I change name-encoding opening a zip file?
Total Commander 9.50 will support it. The beta test will start here in the forum in a few weeks.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I change name-encoding opening a zip file?
> Total Commander 9.50 will support it.
I have Total Commander 10.0. How to change it?
P.S. Thank you for a very good program!
I have Total Commander 10.0. How to change it?
P.S. Thank you for a very good program!
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I change name-encoding opening a zip file?
When you open a ZIP with ENTER or Ctrl+PageDown, it shows [auto] in the "Name" column of the tabstop header (it must be enabled via Configuration - Options - Layout - Show tapstop header).
Right click on [auto] and choose the encoding you need.
Please note that when an archive is encoded with UTF-8 and indicates that in the header, this cannot be changed.
Right click on [auto] and choose the encoding you need.
Please note that when an archive is encoded with UTF-8 and indicates that in the header, this cannot be changed.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I change name-encoding opening a zip file?
Is it possible to add a configuration for the preferred default encoding, or inherit the last used one? It seems the "auto" method often fails to detect UTF-8 encoding names in zip files generated on macOS (judging from the "__MACOSX" folder, not sure about the program used).ghisler(Author) wrote: 2021-07-20, 08:59 UTC When you open a ZIP with ENTER or Ctrl+PageDown, it shows [auto] in the "Name" column of the tabstop header.
Blame on these non-standard-compliant zip files, but it'll make one's life easier to try out UTF-8 "everywhere".
#147523
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I change name-encoding opening a zip file?
The ZIP standard uses a specific bit in the header flags to mark headers using UTF-8. Currently I'm not trying to auto-detect UTF-8 when this flag isn't set, because it can lead to false positives with some Asian languages.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I change name-encoding opening a zip file?
Thanks for the reply! As a user from China, my daily experience is, without the UTF-8 bit, 7-zip and WinRAR "always" write the correct file names, and Total Commander needs some manual help. When a coworker sends me some zip file, I hate to interrupt the workflow inside Total Commander and remind myself, "oh, it's a 7-zip job". Having an option to default to UTF-8 despite the false positives (highly unlikely in my environment) would be dreamy...
#147523
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I change name-encoding opening a zip file?
Since they seem to use 7zip and WinRAR, why not ask them to send you 7z/rar files? There are no such encoding problems with these two formats.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I change name-encoding opening a zip file?
I don't think these .zip files are generated by 7-zip or WinRAR. I meant both 7-zip and WinRAR could handle this encoding issue automatically in decompression, and it's a pity Total Commander could not. Sorry for not making my point clear.
#147523
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I change name-encoding opening a zip file?
I need to see a test file before I can decide whether there is something I can do or not.
Maybe you can edit some files and just remove the contents or replace them with xxx and pack them back.
Maybe you can edit some files and just remove the contents or replace them with xxx and pack them back.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I change name-encoding opening a zip file?
I've emailed you a sample zip file. Thanks a lot!
#147523
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I change name-encoding opening a zip file?
Got it, thanks! The problem is that both in ANSI and UTF-8 encoding the file name contains valid Chinese characters. The flags indicate that the file doesn't use UTF-8...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I change name-encoding opening a zip file?
Thanks for the investigation! I still wonder why standalone file archivers like 7-Zip and WinRAR could guess so well... Is there space for improvement? My personal wish is an option or something to "always try UTF-8 first" (at any risk).
#147523
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How can I change name-encoding opening a zip file?
They probably can't, they just do the check for valid UTF-8 and ignore that the text could also be valid ANSI as the header indicates...
One solution would be an option in the wincmd.ini, e.g. PreferUtf8Dection or so...
One solution would be an option in the wincmd.ini, e.g. PreferUtf8Dection or so...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How can I change name-encoding opening a zip file?
Such an option would be good enough. Thanks in advance.
#147523