-
Notifications
You must be signed in to change notification settings - Fork 129
Description
Hi there,
Using extract-zip with multiples platforms, our team found out that an underlying bug into yaulz (which is itself caused by OSX archiver bug) cause OSX archives containing special characters to have wrongly encoded filenames:
See:
thejoshwolfe/yauzl#84
thejoshwolfe/yauzl#69
Issue being that extract-zip itself work using the default { decodeStrings: true } parameter, which make it loose the original buffer.
I've implemented a fix here: Clovis-team@a68d765
The idea is to introduce chardet as a 'fallback' for the missing utf-8 flag, and if his detection have enough confidence that the passed buffer is indeed utf-8, pretend that the "utf-8 flag" has been set.
I'm not sure it's the best way to go with this problem, so I'm open to suggestions on other ways to handle this issue. I'll probably also propose the same fix into yaulz directly so maybe in near future we could remove this patch by simply upgrade yaulz to latest version. But in the meantime, this could already fix the issue for this package.