.NET
Microsoft Technologies based on the .NET software framework.
3,922 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
var processInfo = new ProcessStartInfo
{
FileName = "cmd.exe",
Arguments = "",
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardInput = true,
RedirectStandardInput = true,
RedirectStandardOutput = true,
CreateNoWindow = true
};
_process.StartInfo = processInfo;
_process.OutputDataReceived += _process_OutputDataReceived;
_process.ErrorDataReceived += _process_ErrorDataReceived;
_process.Start();
_process.BeginOutputReadLine();
_process.BeginErrorReadLine();
there is "楹﹀厠椋?"
in output and I try get it by different encoding but is same.
it is unicode character
Most likely the subprocess app is writing Unicode to the standard output. Try:
new ProcessStartInfo
{
StandardOutputEncoding = Encoding.UTF8,
StandardErrorEncoding = Encoding.UTF8,
…