When running
gnuplot --version
Gnuplot produces a version info. Under Windows in a cmd window, when standard output is redirected to a file or pipelined, no such output is produced:
C:\Users\esc\Downloads>gnuplot543\bin\gnuplot.exe --version gnuplot 5.4 patchlevel 3 C:\Users\esc\Downloads>gnuplot543\bin\gnuplot.exe --version > vers.txt C:\Users\esc\Downloads>type vers.txt C:\Users\esc\Downloads>
vers.txt has zero bytes afterwards.
compare Gnuplot 5.4.2:
C:\Users\esc\Downloads>gnuplot542\bin\gnuplot.exe --version gnuplot 5.4 patchlevel 2 C:\Users\esc\Downloads>gnuplot542\bin\gnuplot.exe --version > vers.txt C:\Users\esc\Downloads>type vers.txt gnuplot 5.4 patchlevel 2 C:\Users\esc\Downloads>
Gnuplot 5.4.1 and 5.4.2 work well when redirected.
I expect the found behavior to be unintentional. Please mind that this breaks use cases where the Gnuplot version is checked from Python and Batch scripts.
It's actually worse than just the version output. My commit [e5f274] accidentally broke redirected output using printf(). Before just reverting this, I need to verify that I doesn't break UTF-8 output to screen again which this commit attempted to fix.
Related
Commit: [e5f274]
Due to this problem, gnuplot 5.4.3 (Windows binary) does not work properly with octave. Reverting the commit [e5f274] resolves the issue.
Related
Commit: [e5f274]
Resolved in master. We use the console API to write to screen and standard file IO for pipes.
I have confirmed that the problem solved in the current master branch.