What program did you use to create that zip archive?
Note that zip in windows also doesn't show file name correctly.
7-Zip keeps compatibility with zip from Windows.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use zip.exe in this archive (in bat-file "zip.exe -9mSD %2 %3"). Total commander show true Дикий помещик.htm in zip (I don't know what plugin it use, 7.02a powerpack) and winrar 3.70 true too.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That zip.exe is not compatible with windows zip.
So there were two ways for 7-Zip:
1) zip.exe compatibilty
2) windows zip compatibilty.
7-Zip keeps compatibility with Zip in Windows.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are some zip archives created with some old zip program (like zip.exe).
There 2 ways to work with these archives:
1) way of zip in windows.
2) another way - maybe Winrar works that way.
Since zip of windows is more popular than winRAR (95% of computers are windows and windows has internal zip), I selected to use way-1 of zip from windows for 7-zip.
Note there is problem only in small number of zip archives created by some old software.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FYI: far2l file manager handles such archives just fine. It has some logic to choose if ansi or oem charset should be used.
See zip.cpp. CP_ACP means Ansi Code Page, like 1251 etc. Relevant discussion.
// if (ZipHeader.PackOS==11 && ZipHeader.PackVer>20 && ZipHeader.PackVer<25)if(LITEND(ZipHeader.Flags)&0x800){// Bit 11 - language encoding flag (EFS) - means filename&comment fields are UTF8;}elseif(ZipHeader.PackOS==11&&ZipHeader.PackVer>=20){// && ZipHeader.PackVer<25CPToUTF8(CP_ACP,Info->PathName);Info->Codepage=WINPORT(GetACP)();}elseif(ZipHeader.PackOS==11||ZipHeader.PackOS==0){CPToUTF8(CP_OEMCP,Info->PathName);Info->Codepage=WINPORT(GetOEMCP)();}
Last edit: unxed 2024-05-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ansi1251 wrong in zip archives
What program did you use to create that zip archive?
Note that zip in windows also doesn't show file name correctly.
7-Zip keeps compatibility with zip from Windows.
I use zip.exe in this archive (in bat-file "zip.exe -9mSD %2 %3"). Total commander show true Дикий помещик.htm in zip (I don't know what plugin it use, 7.02a powerpack) and winrar 3.70 true too.
That zip.exe is not compatible with windows zip.
So there were two ways for 7-Zip:
1) zip.exe compatibilty
2) windows zip compatibilty.
7-Zip keeps compatibility with Zip in Windows.
But why winrar can show Дикий помещик.htm true ? :) Winrar can show file name true on all zip, so 3 way is....
There are some zip archives created with some old zip program (like zip.exe).
There 2 ways to work with these archives:
1) way of zip in windows.
2) another way - maybe Winrar works that way.
Since zip of windows is more popular than winRAR (95% of computers are windows and windows has internal zip), I selected to use way-1 of zip from windows for 7-zip.
Note there is problem only in small number of zip archives created by some old software.
FYI: far2l file manager handles such archives just fine. It has some logic to choose if ansi or oem charset should be used.
See zip.cpp. CP_ACP means Ansi Code Page, like 1251 etc. Relevant discussion.
Last edit: unxed 2024-05-20
Fixed in this patch
https://sourceforge.net/p/sevenzip/bugs/2473/?page=1#46c7
https://github.com/ip7z/7zip/pull/36
Here is zip.exe that produces such files:
https://github.com/tisaconundrum2/zip
1DD3 CENTRAL HEADER #1 02014B50
1DD7 Created Zip Spec 17 '2.3'
1DD8 Created OS 0B 'MVS or NTFS'
...
1E01 Filename 'Дикий помещик.htm'
(in 1251 charset)