-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
[Bug]: On Windows narrow returns empty strings for items #172
Comments
Hi!
You're right; I must have missed that part in the documentation! Strangely, this problem has never happened to me in any of my (numerous) tests, and it still does not happen now... Anyway, I'm working on a fix right now. Thank you for reporting the issue! 🙏 |
Fixed in v4.0.3. I could not test Windows 10 build 1607 specifically, but I managed to reproduce the problem, even though only on Windows 7. In my tests, more recent Windows 10 versions, as well as Windows 11, have no problems when passing both Maybe Microsoft changed the behavior of Anyway, it's better to stick to the documentation, and I fixed the code accordingly. |
Thank you for the wonderful library and quick fix! |
bit7z version
4.0.x
Compilation options
BIT7Z_AUTO_FORMAT, BIT7Z_AUTO_PREFIX_LONG_PATHS, BIT7Z_BUILD_TESTS, BIT7Z_REGEX_MATCHING, BIT7Z_STATIC_RUNTIME
7-zip version
v23.01
7-zip shared library used
7z.dll / 7z.so
Compilers
MSVC
Compiler versions
MSVC 2022
Architecture
x86_64, x86
Operating system
Windows
Operating system versions
Windows 10 build 1607 (without embeded ICU)
Bug description
On Windows narrow returns empty strings for items (without BIT7Z_USE_NATIVE_STRING).
WideCharToMultiByte returns zero
GLE = 1004 (ERROR_INVALID_FLAGS)
See:
https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte
WC_NO_BEST_FIT_CHARS is not compatible with CP_UTF8
Steps to reproduce
No response
Expected behavior
No response
Relevant compilation output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: