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

Fix #75557: Error opening archive w/non-english chars in path #16

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cmb69
Copy link

@cmb69 cmb69 commented Dec 1, 2021

While there is already some support for Unicode file paths, apparently
the archive name itself may only be given as ANSI. To support Unicode,
the ArcNameW of the RAROpenArchiveDataEx struct needs to be set
(instead of the ArcName member).


This is overall an insufficient solution, so must not be merged as is. I'm merely dropping this here, to see where it might go. I noticed that there are already functions to convert between char[] and wchar_t[] in rar.c, but these won't take into account the improved code page support wrt. to Unicode paths on Windows. So I've added Windows and PHP version specific code using the new APIs; the attached test case succeeds, but several others are failing (segfault), due to ArcName being accessed instead of ArcNameW. This would need to be solved as well. I'm not sure, though, whether the Windows specific APIs or the general SAPIs should be used, and whether some kind of abstraction layer would be reasonable.

Thoughts?

While there is already some support for Unicode file paths, apparently
the archive name itself may only be given as ANSI.  To support Unicode,
the `ArcNameW` of the `RAROpenArchiveDataEx` struct needs to be set
(instead of the `ArcName` member).
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

Successfully merging this pull request may close these issues.

None yet

1 participant