OK, some investigation and code work helped reveal the fix.
You need to do the following operations:
1. download the p7zip source package.
2. unpack the package and cd to its parent directory.
3. download the patch (see attachment).
4. patch -p0 <p7zip-9.20.1-manual-iconv-lc_dos.patch
5. "make 7z" inside the p7zip src package and copy ./bin/7z and ./bin/7z.so to 
/usr/lib/p7zip/ to fix the File Roller.
You need to "make 7z 7za sfx" and copy ./bin/* to /usr/lib/p7zip to replace 
p7zip binaries completely.
---
How to use the patched p7zip:
Just call p7zip / any program using it (e.g. file-roller) with LC_DOS 
environment variable set to the respective desired DOS charset. The 
correspondence between your Ubuntu language and DOS charset can be detected in 
2 ways:
1. libnatspec library: sources at http://sisyphus.ru/ru/srpm/libnatspec ; 
binaries at https://launchpad.net/~r0lf/+archive/ppa/+build/1911465 . Just use 
the construction like LC_DOS=cp`natspec -c`
2. gettext itself provides the language-charset table because of DJGPP support. 
Use the following construction:
echo `/usr/share/gettext/intl/config.charset msdosdjgpp | grep \`echo $LANG | 
cut -f1 -d.\` | cut -f2 -d' '`
Of course, the 2nd solution won't work perfectly inside a .desktop file.
Example:
LC_DOS=cp866 file-roller
You also can download the attachment in the post below. It contains .desktop 
file and compiled 7z binaries for amd64. Then:
1. Drag and drop that .desktop file into the Main Menu application (alacarte). 
After that you can create DOS/Win32-compliant ZIP archive by starting the 
"Archive Manager - natspec DOS charset" from main menu.
2. Right click on any ZIP archive and select Properties->Open with->Show other 
...->Archive Manager - natspec DOS charset. After that you can open DOS/Win32 
archives by right-clicking on the file and selecting "Open withArchive Manager 
- natspec ....".

** Patch added: "p7zip-9.20.1-manual-iconv-lc_dos.patch"
   
https://bugs.launchpad.net/ubuntu/+source/file-roller/+bug/177929/+attachment/2598480/+files/p7zip-9.20.1-manual-iconv-lc_dos.patch

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to file-roller in Ubuntu.
https://bugs.launchpad.net/bugs/177929

Title:
  Should autodetect filename character encoding in zip files

To manage notifications about this bug go to:
https://bugs.launchpad.net/file-roller/+bug/177929/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to