mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 07:01:30 +00:00
[idd] install: keep captured output in one encoding
nsExec merges stdout and stderr into one pipe and detects its encoding once. Emit UTF-16LE on both streams so error output cannot reinterpret progress messages as CJK text. Disable CRT buffering on both streams so progress is visible while service and SetupAPI operations are running.
This commit is contained in:
@@ -1149,7 +1149,10 @@ failure:
|
||||
|
||||
int wmain(int argc, wchar_t **argv)
|
||||
{
|
||||
_setmode(_fileno(stdout), _O_U16TEXT);
|
||||
_setmode(_fileno(stderr), _O_U16TEXT);
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
setvbuf(stderr, NULL, _IONBF, 0);
|
||||
|
||||
if (argc < 2)
|
||||
usage(argv[0]);
|
||||
|
||||
Reference in New Issue
Block a user