Skip to content

Commit

Permalink
Changed in- and output stream to utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
SirBitesalot authored and SirBitesalot committed Feb 15, 2017
1 parent 553ca5d commit edcb7d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AvorionServerManager/ManagerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ public void StartAvorionServer()
startInfo.FileName = Path.Combine(ManagerSettings.AvorionFolder, "bin", "AvorionServer.exe");
startInfo.WorkingDirectory = ManagerSettings.AvorionFolder;
startInfo.Arguments = ServerSettings.GetCommandLine();
startInfo.StandardOutputEncoding = Encoding.UTF8;
_process = new Process();
_process.StartInfo = startInfo;

Expand Down Expand Up @@ -264,7 +265,9 @@ private void ProcessCommandRequest()
{
foreach (string currentParameter in tmpCommand.Parameters)
{
_process.StandardInput.WriteLine(currentParameter);
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(currentParameter);
_process.StandardInput.BaseStream.Write(buffer, 0, buffer.Length);
_process.StandardInput.WriteLine();
}
}
}
Expand Down

0 comments on commit edcb7d0

Please sign in to comment.