Mauro Talevi wrote:

I've tried setting UTF-8 encoding on resources plugin, but that makes the images unreadable on Mac.

Do you filter the images? AFAIK, the Resources Plugin should not alter a file's contents during copying unless <filtering> is enabled on the <resource> set.

If you filter your web stuff, you will need to exclude the images (and any other files with binary content) from the filtering. I.e. define two mutually exclusive <resource> sets, one for the text files to be filtered and one for the binary stuff to be just copied over unaltered.

Ant's <copy> task also has a warning about filtering binary data [0].

I note in passing that the dependency plugin uses the Plexus Unarchiver to unpack, but only the ZipUnarchiver allows to set the encoding property. Is there any reason why setEncoding() is not pulled up to Unarchiver interface?

ZipUnarchiver.setEncoding() only controls the encoding for file names as given by zip entries [1,2], not the encoding of the compressed file contents [3]. So unless you experience corrupt file names, that shouldn't be the cause of your problem.


Benjamin


[0] http://ant.apache.org/manual/CoreTasks/copy.html#encoding
[1] http://fisheye.codehaus.org/browse/plexus/plexus-components/trunk/plexus-archiver/src/main/java/org/codehaus/plexus/archiver/zip/AbstractZipUnArchiver.java?r=plexus-components:trunk#l57 [2] http://fisheye.codehaus.org/browse/plexus/plexus-components/trunk/plexus-archiver/src/main/java/org/codehaus/plexus/archiver/zip/ZipFile.java?r=plexus-components:trunk#l83 [3] http://fisheye.codehaus.org/browse/plexus/plexus-components/trunk/plexus-archiver/src/main/java/org/codehaus/plexus/archiver/zip/AbstractZipUnArchiver.java?r=plexus-components:trunk#l222

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to