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

[Feature Request]: Manually specify character encoding / codepage / mcp #248

Open
1 task done
Silverlan opened this issue Sep 30, 2024 · 1 comment
Open
1 task done
Assignees
Milestone

Comments

@Silverlan
Copy link

Feature description

I have a zip-archive which contains file names with Japanese characters.
When opening or extracting the archive with 7zip, the files are displayed with incorrect encoding:
7zFM_xx7GKDpWQ3

The same happens when extracting the archive using bit7z.

I can, however, extract the files properly by using the "-mcp" option of 7z:
7z x -mcp=932 "スマトラ im11462659.zip"

(932 = Shift-JIS encoding)

explorer_v4BdPPyvk4

As far as I can tell, there's currently no way to specify this option when using bit7z right now. Could this be added in a future update please?

The archive I've used for testing can be downloaded here: https://bowlroll.net/file/323005 (Scroll down for download button.)

I know about the solution using a manifest file mentioned here:
#163 (comment)

This does not work in my case, as I need a specific encoding for specific archive files only.

Additional context

No response

Code of Conduct

@rikyoz
Copy link
Owner

rikyoz commented Oct 1, 2024

Hi!

As far as I can tell, there's currently no way to specify this option when using bit7z right now.

Yeah, it's not supported at the moment.

Could this be added in a future update please?

I think it is possible. The API that 7-Zip provides for setting the codepage wasn't very clear. But after reading 7-Zip's source code, I managed to understand how to achieve it and made a working proof-of-concept.
I still need to work out the optimal API and implementation.
I hope to add it for the next v4.0.9.

Thanks for suggesting this feature! 🙏

@rikyoz rikyoz added this to the v4.0.9 milestone Nov 2, 2024
rikyoz added a commit that referenced this issue Nov 2, 2024
rikyoz added a commit that referenced this issue Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants