Obviously, the purge-fix above is not the fix but the "break" :). Actually, it 
seems that the problem is inside the p7zip package. The 7z program does not 
convert the character coding. It has the "scs" switch to convert the charset 
but it is not implemented in versions up to the p7zip_9.20.1.
The cyrillic names in Windows-created ZIP file are stored in cp866. 
Surprisingly it is pretty difficult to add cp866 locale to Ubuntu. The typical 
solution:
$ sudo /usr/share/locales/install-language-pack ru_RU.CP866
$ sudo locale-gen
fails with silent error on the first command. Other solutions fail too (cannot 
open locale definition file ru_RU.CP866: No such file or directory). The 
following command does not list cp866 too:
cat /usr/share/i18n/SUPPORTED | grep ^ru
The easiest way to deal with cp866 is to set LC_CTYPE to C (it means no 
conversion), and convert the output with iconv.
--
The workaround is attached as a patch. Apply it to /usr/bin/7z.
7z-natspec.patch: autodetects your DOS charset. Requires libnatspec to be 
installed (see the next attachment).
7z.patch: please set manually windows_codepage (2nd line) to your DOS charset.
--
The solution described is applicable to any region-specific charset.

** Patch added: "Autodetects our DOS charset. Requires libnatspec to be 
installed."
   
https://bugs.launchpad.net/ubuntu/+source/file-roller/+bug/177929/+attachment/2590958/+files/7z-natspec.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