Skip to content

Commit 95f9a4f

Browse files
committed
Fix utf-8 encoding issue
It's safer to assume UTF-8 always
1 parent c687e24 commit 95f9a4f

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/dotnet-burn/Program.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,12 @@
123123
hbArgs.Insert(4, "--srt-file");
124124
hbArgs.Insert(5, subtitles);
125125
hbArgs.Insert(6, "--srt-burn");
126+
hbArgs.Insert(7, "--srt-codeset");
127+
hbArgs.Insert(8, "utf-8");
126128

127-
var psi = new ProcessStartInfo(HandBrake.Path, string.Join(" ", hbArgs))
128-
{
129-
//RedirectStandardError = true,
130-
//RedirectStandardOutput = true,
131-
//UseShellExecute = false,
132-
};
129+
var psi = new ProcessStartInfo(HandBrake.Path);
130+
foreach (var arg in hbArgs)
131+
psi.ArgumentList.Add(arg);
133132

134133
AnsiConsole.MarkupLineInterpolated($"[grey] => {psi.FileName} {psi.Arguments} [/]");
135134
Process.Start(psi)?.WaitForExit();
@@ -140,7 +139,7 @@
140139
{
141140
AnsiConsole.Write("burn: ");
142141
AnsiConsole.WriteLine(e.Message);
143-
AnsiConsole.WriteLine("Try `greet --help' for more information.");
142+
AnsiConsole.WriteLine("Try `burn --help' for more information.");
144143
return -1;
145144
}
146145

0 commit comments

Comments
 (0)