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)