If the name stored in a zip file is of the form
most C string routines will ignore the ' world' at the end.
In the case of a zip file where the stored filename contains a null
character, most zip programs (on the mac) ignore the trailing garbage and consider the end of the name to be the null character. Rubyzip does not, and this causes a few headaches with some zip files (possibly generated by bad zip generating programs.)
@name = io.read(nameLength) @name = io.read(nameLength).unpack('Z*').first
at line approx. 600 in zip.rb yields a behaviour that is reasonable and consistent with other .zip programs, with the name stored in the ZipEntry terminating at the first null character in the string read from the file.
Possibly a warning could be printed when RubyZip detects this, and then the trailing garbage ignored.