> require 'zip/zip' > > Zip::ZipFile.open("test.sxw") {|zf| > zf.replace("content.xml", "content_new.xml") > } > > What I want to do is, opening a OpenOffice.org Writer file, which > is actually a zip file containing 5 files and 1 folder with 1 file, > and replacing the document's content file, which is encoded in UTF-8, > with a new one. The strange thing is when the resultant zip file is > decompressed, the replaced file is decompressed fine, but the rest > of files are corrupted. Oups, you found a bug. A fix has been committed to CVS. Cheers, Thomas