- ВКонтакте
- РћРТвЂВВВВВВВВнокласснРСвЂВВВВВВВВРєРСвЂВВВВВВВВ
- РњРѕР№ Р В Р’В Р РЋРЎв„ўР В Р’В Р РЋРІР‚ВВВВВВВВРЎР‚
- Viber
- Skype
- Telegram
Кириллица в StreamReader
Мне необходимо перенаправить вывод из комндной строки в свою фому. Но при записи через StreamReader кириллица отображается некорректно. Как верно отобразить кириллицу? Изменить кодировку?
public void Run(RichTextBox rtb) {
ProcessStartInfo startInfo = new ProcessStartInfo
{
FileName = "cmd.exe",
Arguments = "/c " + @"help",
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true
};
Process process = new Process();
process.StartInfo = startInfo;
process.Start();
using (StreamReader reader = process.StandardOutput)
{
rtb.Text = reader.ReadToEnd();
}
}