-o stdout bug on Windows
Posted: Sun Aug 12, 2018 12:17 pm
Hi,
I am currently testing NConvert on windows, and want to avoid temporary file creation by redirecting output to the stdout. When collecting the output from stdout, the 0x0a in the output is always being converted to 0x0d+0x0a (\r\n) by Windows, which means that Windows treats the output as a string.
Can you forcibly set the output to binary (i.e., "setmode(fileno(stdout),O_BINARY)") in such case, so that Windows will not do such conversion?
Thanks!
I am currently testing NConvert on windows, and want to avoid temporary file creation by redirecting output to the stdout. When collecting the output from stdout, the 0x0a in the output is always being converted to 0x0d+0x0a (\r\n) by Windows, which means that Windows treats the output as a string.
Can you forcibly set the output to binary (i.e., "setmode(fileno(stdout),O_BINARY)") in such case, so that Windows will not do such conversion?
Thanks!