OpenSolaris

Printable Version Enter a New Search
Bug ID 6719511
Synopsis unzip should support non ascii file name
State 10-Fix Delivered (Fix available in build)
Category:Subcategory utility:zip
Keywords
Responsible Engineer Jiri Sasek
Reported Against
Duplicate Of
Introduced In
Commit to Fix snv_98
Fixed In snv_98
Release Fixed solaris_nevada(snv_98)
Related Bugs 6683811
Submit Date 26-June-2008
Last Update Date 10-September-2008
Description
In the Windows world, non ascii file name is often used.
Then many user create a zip file which includes localized encoding.
To unzip this file on Solaris, we need unzip command which handle localized encoding.
Ubuntu is already supporting this by the patch and this can be available through

http://archive.ubuntu.com/ubuntu/pool/main/u/unzip/unzip_5.52-11ubuntu1.diff.gz

So Solaris should apply this patch in the local workspace until this is bundled
in unzip updated version. I tried this patch under usr/src/cmd/unzip workspace
and confirmed it can be used only by removing 'inline' from the patch.
===
% diff unzip_5.52-11ubuntu1.diff.org unzip_5.52-11ubuntu1.diff
596c596
< +inline void oem_intern(char *string)
---
> +void oem_intern(char *string)
602c602
< +inline void iso_intern(char *string)
---
> +void iso_intern(char *string)
===
After that, we can use -O option for specifing the Windows encoding. For example,
convertiong Japanese sjis,
   % unzip -O sjis <zip file>.zip

UnZip 5.52 of 28 February 2005, by Ubuntu. Original by Info-ZIP.
:
  -O CHARSET  specify a character encoding for DOS, Windows and OS/2 archives
  -I CHARSET  specify a character encoding for UNIX and other archives
Work Around
N/A
Comments
N/A