ConsoleRedirect 1.0.0
Chapter 5 Console Redirect 1.0.0
The code of the book works fine. However, we have a pitfall.
The batch file(cmd)'s default character encoding is different from Visual Studio.
If you create cmd file via Visual Studio, it might be UTF-8 with BOM. In Japan, cmd's character encoding default is Shift_JIS.
The cmd will execute in Shift_JIS. Please check your default encoding of batch files of your country.