Converting Paths from within Windows processes on top of Wine

Gabriel Ivăncescu gabrielopcode at gmail.com
Mon Jan 18 09:20:35 CST 2021


On 18/01/2021 15:57, Sebastian M. Ernst wrote:
> 
> Potentially stupid question: Why are Wine's "Windows" paths using
> unicode (wchar) while the unix counterparts are not (char)? It's the
> same both in the kernel32 and NT APIs.
> 

Because the Windows APIs work with wide character strings (UTF-16), 
that's how Microsoft designed them. Unix uses UTF-8 which are char 
(potentially multi-byte) strings.

Both of them can encode Unicode, they just do it in different ways. IMO, 
UTF-8 is much saner, but we're stuck with UTF-16 when working with 
Windows APIs because of Microsoft's decision.



More information about the wine-devel mailing list