Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

File name issue in Archive::Zip

by AATG_PERL_1010 (Initiate)
on Oct 25, 2011 at 13:04 UTC ( #933619=perlquestion: print w/replies, xml ) Need Help??
AATG_PERL_1010 has asked for the wisdom of the Perl Monks concerning the following question:

I am using Archive::Zip for zipping directories/files. It is working fine, but the file name which has swedish characters like is not encoded properly by Archive::Zip. It is printing as different symbols within the created zip file. Can any one suggest me any idea to solve this issue.

Replies are listed 'Best First'.
Re: File name issue in Archive::Zip
by Fox (Pilgrim) on Oct 25, 2011 at 14:07 UTC
    This is a known problem is the zip spec. If you were to have a choice I had say don't use Zip. an great alternative is 7z which have proper support for unicode.

    If you don't have a choice, you will have to do the work yourself. See this:
Re: File name issue in Archive::Zip
by Lotus1 (Curate) on Oct 25, 2011 at 14:18 UTC

      I am using perl version 5.8.8 for MSWin32-x86-multi-thread

      and perl v5.8.4 for sun4-solaris-64int

      I am using both Windows(XP) and Solaris( sun4-solaris-64int). First i will do the coding/testing in windows, once it is done, i will commit to Solaris server and then finally will use that code from Windows machine(As a web based application(using CGI)).

      When i was searching for the version of Archieve::Zip through its package ".pm" file, i found it is Revision 1.6 and created in 2000

        That is a really ancient version of Archive::Zip. Although the bug is still active why not upgrade and try again. The part that you need might have been fixed already.

Re: File name issue in Archive::Zip
by roboticus (Chancellor) on Oct 25, 2011 at 13:58 UTC


    I'd double-check everything around line 42.



    When your only tool is a hammer, all problems look like your thumb.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://933619]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-01-20 19:53 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.