I have an issue with encoding of process.standartInput encoding. i am using some process in my windows form application but input should be UTF-8. Process.StandardInput.Encoding is read only so i can't set it to UTF-8 and it gets windows default encoding which deteriorate native characters which are good in UTF-8. 2 processes are used in the program one writes output to a file and other reads. Since i can set up output encoding to UTF-8 that part is working properly but reading back is the part where i am having problems. I'll include the part where i use the process.
ProcessStartInfo info = new ProcessStartInfo("mysql");
info.RedirectStandardInput = true;
info.RedirectStandardOutput = false;
info.Arguments = mysqldumpstring;
info.UseShellExecute = false;
info.CreateNoWindow = true;
Process p1 = new Process();
p1.StartInfo = info;
p1.Start();
string res = file.ReadToEnd();
file.Close();
MessageBox.Show(p1.StandardInput.Encoding.EncodingName); //= where encoding should be Encoding.UTF8;
p1.StandardInput.WriteLine(res);
p1.Close();