Ask a Question related to PERL Modules, Design and Development.
-
Mike Scott #1
Archive::Zip problem
Maybe I've misunderstood something. But when calling $zip->contents() I
keep getting characters added and/or replaced within the returned string.
EG the following code snippet:
$content = 'content.txt';
my $zip = Archive::Zip->new('test.zip');
my ($contentstring, $status) = $zip->contents($content);
print "after reading contents: +++", $contentstring, "+++\n";
The member content.txt contains, simply,
XXXchar="dot"XXX
However the returned string, in this case, is prefixed with extra weird
characters:
%od -ab ~/xxxx
0000000 a f t e r sp r e a d i n g sp c o
141 146 164 145 162 040 162 145 141 144 151 156 147 040 143 157
0000020 n t e n t s : sp + + + ef bb bf X X
156 164 145 156 164 163 072 040 053 053 053 357 273 277 130 130
0000040 X c h a r = " d o t " X X X + +
130 143 150 141 162 075 042 144 157 164 042 130 130 130 053 053
0000060 + cr nl
053 015 012
0000063
(Note the hex ef, bb, bf inserted.)
In general, at least some non-ascii bytes are changed too - I'm trying
to work with OpenOffice files, and for example the 'bullet' character
comes out wrongly.
Oddly though, if I use extractTree() to make a file copy of content.txt,
that appears to be accurate, a least in this test case.
The same problem occurs on XP and freebsd installations, both using 1.16
of archive::zip.
Can anyone clue me into what's going on here please?
--
Please use the corrected version of the address below for replies.
Replies to the header address will be junked, as will mail from
various domains listed at [url]www.scottsonline.org.uk[/url]
Mike Scott Harlow Essex England.(unet -a-t- scottsonline.org.uk)
Mike Scott Guest
-
Archive::Tar
Sample Code: $a = new Archive::Tar ; $a->add_files( 'images/kids.gif' ) ; @files = $a->list_files() ; ## $files is 'kids.gif' chdir '/tmp' ;... -
tar archive problem
Hello, I have 2 systems one motorola m68020 based proprietory unix and the other pentium based linux. Both have qic 150 drive. I took backup on... -
using Archive::Zip
Hello, I have over 200 zip files in about 100 sub-directories of say c:\docs. Each zip file contains one MS Word doc file. The name of the doc... -
[PHP-DEV] PHP archive
Not so long ago, it was proposed that we should have an PHP archive model like Java does. I think it might me useful for application deployment.... -
Archive
On Fri, 25 Jul 2003 12:31:03 GMT, "nospam" <bruceradtke@REMOVEspamREMOVE.earthlink.net> wrote: I think you misread that - comp.unix.sco is no...



Reply With Quote

