> Though, I guess I like the MultiByteToWideChar() wrapper, although I don't 
> understand the use case for the non-UNICODE code path

With `UNICODE` force-defined as it has, there's isn't much of one. But it's 
possible (and easy) to support both the ASCII and Wide versions with minimal 
difference in code, so I did in that gist.

> also find it weird that it doesn't use the locale codepage rather than ASCII? 
> (maybe it's what it's supposed to do for non-W functions, not quite sure)

IIUC all functions used to be ASCII, then in Windows NT they added support for 
Unicode, so they added a `DoFooA()` function for ASCII, `DoFooW()` function for 
Wide/Unicode, and have wrapper macros `DoFoo()` which is `#define`d to one of 
those based on whether `UNICODE` is defined (likewise for type `TCHAR` and 
related types and macros).

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/809#issuecomment-164470002

Reply via email to