The Chinese filename in zip archive which compressed under win xp/win 7
won't unarchive correctly by 7z nor zip command.
It's an old bug[1] and still exists.
Luckily unar can fix this issue perfectly, so add zip mimetype in unarchiver
and increase its priority to handle zip archive.
Details
- "git clone kde:ark" and build the latest ark and unarchive my zip file
- It's totally unreadable like this
(I use "7z l" to get the result, the highest priority plugin to handle zip mimetype)
2016-03-21 10:38:56 ..... 30208 8269 ¤½¶}¾\Äý¸ê®Æ¼t°Ó·N¨£ªí.doc
2016-03-21 10:38:56 ..... 306176 73434 «´¬ù±ø´Úªþ¥ó¤@_°]ª«³W®æ®Ñ.xls
2016-03-21 10:38:56 ..... 39424 9654 «´¬ù±ø´Úªþ¥ó¤T_Å禬¬ö¿ýÀÉ.doc
- With the patch, it works well, including listing filenames,
open libreoffice by clicking the filename listed in ark, and
unarchive the whole zip file.
(I use "lsar" to get the result which is wriiten in unarchiver plugin")
(I'm not sure if those chinese characters could be handle well by the review tool)
公開閱覽資料廠商意見表.doc
契約條款附件一_財物規格書.xls
契約條款附件三_驗收紀錄檔.doc
Diff Detail
- Repository
- R36 Ark
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage
I'm sorry but this patch would make Ark unable to create zip archives, since the unarchiver plugin is read-only.
We need to find a better solution. I'm currently working on a rework of the plugin architecture, to make it more flexible and user-configurable. Once we have that, we can consider adding more mimetypes to unarchiver.
In the meantime, what's your p7zip version? Tha latest 15.14 upstream version has some improvements in filenames encoding, maybe you can try with that.
I tried the latest debian package I can find, the version is
7-Zip [64] 15.14 : Copyright (c) 1999-2015 Igor Pavlov : 2015-12-31
But no luck, the file name still doesn't be handled well.
May I know your plan when you will finish the re-work?
Do you have a development git tree that I could try?
We're suffering for the unreadable file name for a very long time,
I would like to help on this to make the progress faster,
what can I do?
No, I plan to merge everything on master. The goal is to be able to enable/disable a specific plugin.
Initially it will only be possible to do so by manually editing the ~/.config/arkrc file. Hopefully a GUI in the settings dialog will be available before the 16.08 release.
We're suffering for the unreadable file name for a very long time,
I would like to help on this to make the progress faster,
what can I do?
Not much unfortunately on the Ark side. There is very little we can do for now. However you can try to report the issue to the upstream developers of 7z (p7zip): https://sourceforge.net/p/p7zip/bugs/?source=navbar
To enable/disable a specific plugin is still not a good solution to my issue.
I'm thinking of adding some code to make it fallback to the second priority
plugin to do some other action which is no provided by the first
priority plugin.
Do you agree this solution?
I think this does not conflict with your current work.
This would be good, but it's not going to be easy to implement.
You would need somehow to detect that the first ListJob failed to provide readable filenames, and then start another job with another plugin.
Do you agree this solution?
I think this does not conflict with your current work.
It doesn't :)
Hi,
I got a new idea that we can provide a plugin selection box on the toolbar,
so that user can change the plugin they use during runtime.
If this is acceptable, we can add one more selection box after plugin selection if the plugin support enconding option.
What do you think?
The toolbar is not the right place. Most kde apps show a "plugin manager" page in their settings dialog, we should do something similar.
@acelankao
You got less than one day if you want to get this patch in the upcoming Applications 16.08 release :D