[PATCH 0/2] MR308: Add "wine/str.h", use "wine/heap.h" and it in winemenubuilder
Davide Beatrici (@davidebeatrici)
wine at gitlab.winehq.org
Thu Jun 23 21:44:26 CDT 2022
I originally wanted to add these utils into `unicode.h`, but it cannot be used with msvcrt headers.
This prompted the creation of a new header called `str.h`.
The name is generic and broad, but the file may grow to contain more general stuff in the future.
The rationale behind writing the UTF helpers is mainly to solve, at least in part, the complexity.
`WideCharToMultiByte()` and `MultiByteToWideChar()` in particular are quite dangerous as they treat the buffer size as bytes for `char` (8 bits) and as number of characters for `WCHAR` (16 bits).
There are already several wrappers around the codebase, mine should be able to replace them.
More information about the wine-devel