-
Notifications
You must be signed in to change notification settings - Fork 8
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
Filename characters are displaying incorrectly #8
Comments
I created an archive containing a single file named As a workaround, you could extract the archive and traverse the output directory instead. Of course, assuming the overhead is acceptable. |
Ok, thanks for the suggestion. Think the ASCII can be converted to UTF-8 format. Tried this utility and it converts the names correctly: |
FYI, if anyone else stumbles upon this issue, then theres a simple little utility that can convert the ASCII to UTF8 here: |
The culprit is this callback: https://github.com/use-strict/7z-wasm/blob/master/cli.js#L21 It turns out Emscripten spits out individual signed bytes, so we need to decode the UTF-8 encoded output manually instead of treating each byte as an ASCII character. Due to lack of time, I'm going to treat this as low priority, but I am accepting PRs. The solution is to decode UTF-8 on the fly, character by character. We DON'T want to buffer the output and print it all at once before exiting.
|
You can try exposing a runtime function. I know that a |
Filenames that contain non-English characters (e.g. ä,é,è,ö ...) are not listed correctly.
When I run normal command line 7z, it works fine:
7z l Archive.7z
I get following output:
But when I run the 7z-wasm version:
npx 7z-wasm l Archive.7z
I get following output:
I wonder if it has something to do with the locale? Is C.UTF-8 more restrictive? How can that be changed? Any ideas?
The text was updated successfully, but these errors were encountered: