Jaco Greeff jaco@puxedo.org writes:
Umm, I'm not and if I am, I should be shot. The logic behind what I'm doing is more or less as follows:
- Print all non-formatting characters to file;
- Parse the formatting string, converting between %S and %s.
- Print the formatting string with arguments, converting the unicode
strings via WideStringToMultiByte;
So yes, the strings will be converted before being printed since I'm printing them via the %s formatting specifier. (And the test code results does show that this is indeed the case)
You were doing it for strings but not for characters; but I see you have fixed this now. Still, this only works for vfprintf, vfwprintf has to output in Unicode so you cannot convert to ASCII or use the system printf for that. It would probably be easier to grab a printf implementation from somewhere and convert it to Unicode.