I’m now playing with ruby-zip. I can make it work right for
decompression of zip files, but somehow not for compression.
It actually creates a zip file, but it’s corrupted. Could anyone
point me to the right direction? I’m a novice programmer and ruby-zip
is scarcely documented, so maybe I’m not aware of things that
require attention.
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.
BTW, I’m doing this on Windows XP and arton’s ActiveScriptRuby
1.8.0.5.
I’m now playing with ruby-zip. I can make it work right for
decompression of zip files, but somehow not for compression.
It actually creates a zip file, but it’s corrupted. Could anyone
point me to the right direction? I’m a novice programmer and ruby-zip
is scarcely documented, so maybe I’m not aware of things that
require attention.
I’ve encountered the same issue doing the same thing.
You may be interested in a new RubyForge project, OOo4R, which intends
to offer a reasonably compleate, pure-Ruby API for manipulating
OpenOffice documents.
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.