Skip to content

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.

1 participant