node-zip
node-zip copied to clipboard
fixed garbled problem.
nodezip-cli.js has a garbled problem for multi-byte characters.
https://github.com/daraosn/node-zip/blob/a0d39629b6cbd84403f7b43c1f4e6c485478b93d/lib/nodezip-cli.js#L73
fs.readFileSync returns string content of filepath decoded as 'latin1' ('binary' is alias), then zip.file treats its string content as "utf-8" (see jszip v2.5.0 lib/objects.js).
To solve it, you remove the second argument 'binary'. Then it will be treated as binary.