← Back to team overview

desktop-packages team mailing list archive

[Bug 495880] Re: File Roller cannot handle archive that doesn't encode filenames in UTF-8

 

Along with the command-line version of unzip with the -O option, you can
also use the convmv command to change filenames of previously extracted
files. This works on an ext3 filesystem, but NTFS may give an error
because filenames are invalid. ext3 says the encoding is invalid but
still lets them be renamed to that.

So for anyone who encounters this bug report and is concerned
specifically with extracting filenames from shift-jis encoded archives,
these are the commands you can use:

(navigate to directory, and...)
unzip -O shift-jis <filename>
or
convmv * -f utf8 -t iso8859-1 -r
convmv * -f utf8 -t iso8859-1 --notest -r ; convmv -f shift-jis -t utf8 * --notest -r

One of the other bug reports links to this, which lists solutions and problems:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=483290

One consideration might be if files in the same archive use different
encoding types. It seems reasonable that they appeared that way to the
archive's creator, and thus they shouldn't be interpreted separately,
but it could lead to the wrong conversion method being selected.

The patch linked in that bug report describes the options -O and -I,
which aren't documented in unzip's manual pages, so it's possible that
patch is already applied. But it still didn't detect 'proper' encodings
for me when I tested file-roller, using unzip, on several archives after
uninstalling p7zip.

The patch also talks the current locale charset. Making assumptions
about the encoding used on files could be correct for many people, most
of the time, but will be incorrect for other people, and so is at best
only a partial solution. I don't know what the patch does after that
though.

Just for reference, these are other Debian bugs mentioned in that
report:

> Bug#197427: unzip: chinese filenames unwrapped on unix wrongly
> Bug#197428: unzip: zipinfo (and unzip) can't deal with chinese filenames like miniunzip can
> Bug#339021: unzip: incorrectly converts cyrillic file names from Windows-created ZIPs

** Bug watch added: Debian Bug tracker #483290
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=483290

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

Title:
  File Roller cannot handle archive that doesn't encode filenames in
  UTF-8

Status in file-roller package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: file-roller

  I have received a zip containing a file with a german "Umlaut" in the
  filename. I cannot extract the file because I get the following error
  message:

  caution: filename not matched:  Liste Verwaltung und Verk\?ndigung
  Dezember 2009.xls

  I have no possibility to change the filename and eliminate the
  "Umlaut" in the filename...

  ProblemType: Bug
  Architecture: i386
  CheckboxSubmission: e27141b8feed9a0134eefdd87f008818
  CheckboxSystem: 558fbfb2a1258711a37bb7e23c5d4e6e
  Date: Sat Dec 12 11:48:49 2009
  DistroRelease: Ubuntu 9.10
  ExecutablePath: /usr/bin/file-roller
  NonfreeKernelModules: nvidia
  Package: file-roller 2.28.1-0ubuntu1
  ProcEnviron:
   LANGUAGE=de_DE.UTF-8
   PATH=(custom, no user)
   LANG=de_DE.UTF-8
   SHELL=/bin/bash
  ProcVersionSignature: Ubuntu 2.6.31-16.53-386
  SourcePackage: file-roller
  Uname: Linux 2.6.31-16-386 i686
  XsessionErrors:
   (gnome-settings-daemon:3121): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
   (gnome-settings-daemon:3121): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
   (polkit-gnome-authentication-agent-1:3161): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
   (nautilus:3155): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed

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