>>> Apparently you need to use appropriate console output APIs directly (that >>> take into account the console input/output code page) instead of using >>> MSVCRT APIs. >>> >> Unfortunately just using the wide console function will only help the >> output to the screen, but as my test program shows there is the same >> discrepency when the output is to a file handle... >What your test app is doing? It probably needs a test under Windows to >see in which encoding (ANSI/OEM) a not unicode app should receive input >via a pipe.
>From the original mail: // File i/o has same problem? (Windows - narrow, Wine - includes nulls) WCHAR buffer[] = L"Hello Jason\n"; f = _wfopen(L"test", L"w+t"); fwprintf(f, buffer); fclose(f); So basically inside msvcrt we know we have a Unicode string to output from wprintf (and friends), but what conversion occurs before physically outputting it - Is it just a straight conversion to the console codepage perhaps? Jason