Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracting specials characters from OSX archive #132

Open
avallete opened this issue Jul 20, 2022 · 0 comments
Open

Extracting specials characters from OSX archive #132

avallete opened this issue Jul 20, 2022 · 0 comments

Comments

@avallete
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant