Version: (using KDE Devel) Installed from: Compiled sources In Japan, a zip made by msdos/ms-windows has filenames in Shift-JIS encoding, is different with the UNIX filename encoding,"EUC-JP". I with to KZip coverts the file name encoding in this case. Fortunately zip file format keeps make-by-os infomation. With this info, we can safely choose qt-text-codec for convertion, I supposed.
Created attachment 7448 [details] kzip_dosfilename_jp.patch if in JAPANESE_LOCALE, Converts a file name encodings to UNICODE in the zip archive made by msdos/ms-windows from "Shift-JIS", not from Unix filesystem encoding provided by QFile::decodeName().
Hi, could you please attach a small zip file with this encoding, so that i can test it before applying the patch ? thanks, Holger
Created attachment 7724 [details] a small zip file with SJIS(Japanese-DOS) encoding. This ZIP file is created by Info-ZIP on MS-Windows(Japanese) H:\tmp\k>unzip -l a.zip Archive: a.zip Length Date Time Name -------- ---- ---- ---- 36 04-09-29 22:14 あいうえお.txt -------- ------- 36 1 file
See also bug #82436 for problem about ZIP file name encoding.
Created attachment 97738 [details] ZIP attachment imported from bug #335716 Same problem with ZIP archives created by Windows containing filenames in Russian. In these ZIP files filename encoding is CP866 (the one used for Russian in MS-DOS), but QFile::decodeName() uses encoding from locale which is most often UTF-8. The code in karchive/src/kzip.cpp from KF 5.20.0 is still affected.
It's a bug because some archives cannot be opened correctly.
The big question is whether the information of the filename encoding is present in the ZIP file format.
No. Formerly, The information of the filename encoding is NOT present in the ZIP file format. The information of the OS that the zip file made by is present in the "version made by" ZIP file header.The filename encoding , in most case, is determined with "version made by" and User Language by a historical reasons. See also https://marcosc.com/2008/12/zip-files-and-encoding-i-hate-you/ But nowadays, UTF-8 international file name storage was introduced in APPNOTE.TXT version 6.3.0, 2006-09-29. http://www.digitalpreservation.gov/formats/fdd/fdd000354.shtml What can we do?
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!