Unknown Command '????' in C# .Net Application
I have the code listed below which is basically a modified version of the C# .NET example provided on the WinSCP site. When I print the standard output to a log it shows the command being passed in as ???? instead of "open test". No matter what command is passed in it gets translated to question marks. Is this possibly an encoding issue. This is a .NET 4 Framework application.
Code
Output in log file
winscp> ????
Unknown command '????'.
winscp>
Code
Process winscp = new Process(); winscp.StartInfo.FileName = "winscp.com"; winscp.StartInfo.Arguments = "/log=\"log.xml\""; winscp.StartInfo.UseShellExecute = false; winscp.StartInfo.RedirectStandardInput = true; winscp.StartInfo.RedirectStandardOutput = true; winscp.StartInfo.CreateNoWindow = true; winscp.Start(); winscp.StandardInput.WriteLine("open test"); string output = winscp.StandardOutput.ReadToEnd(); TraceService(output);
Output in log file
winscp> ????
Unknown command '????'.
winscp>