Skip to content

Commit c3028bc

Browse files
committed
Explicitly set the console output encoding in GetGrammar
We always want the output to be in UTF-8.
1 parent a257ca7 commit c3028bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/GetGrammar/Program.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
using System;
2626
using System.IO;
27+
using System.Text;
2728
using System.Threading.Tasks;
2829

2930
namespace ExtractGrammar
@@ -40,6 +41,8 @@ public static async Task Main(string[] args)
4041
using var inputFile = new StreamReader(args[0]);
4142
string section = "";
4243

44+
Console.OutputEncoding = Encoding.UTF8;
45+
4346
while (await inputFile.ReadLineAsync() is string inputLine)
4447
{
4548
if (inputLine.StartsWith("#"))

0 commit comments

Comments
 (0)