Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Internal SharpCompress has a hardcoded UTF-8 encoding in
The encoding provided in constructor to:
is saved into a variable and never actually used.
I have created a pull request for
that allows the encoding to be set via static ArchiveEncoding.Default field.
It is now merged in sharpcompress master.
Thanks for getting the ball rolling and getting that merged. I think we should be passing the encoding to ZipWriter's through its constructor though and not relying on the static value in ArchiveEncoding which could be changed at any time. This can lead to corrupted Zip archives if another thread changes the encoding while another is writing the archive.
The problem is such change would require a change in SharpCompress API.
It's hard to say if they'll accept the change as it might break people's programs using the library.
I don't think a concurent change would break the archive (we'd only have paths in different encodings).
I'd say we should go ahead with the change as it's fairly trivial, offers improvement and the corner case of multithreaded, multiencoding zipping shold be rather rare.
I fixed it in a slightly different way.
Please let me know if there's any problem.