From 644f24a002896997c4dfb36777822e888f484d4c Mon Sep 17 00:00:00 2001 From: rvazarkar Date: Thu, 30 Nov 2023 10:26:58 -0500 Subject: [PATCH 1/2] fix: don't write UTF8-BOM --- src/Writers/JsonDataWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Writers/JsonDataWriter.cs b/src/Writers/JsonDataWriter.cs index 8698aac..9bb456a 100644 --- a/src/Writers/JsonDataWriter.cs +++ b/src/Writers/JsonDataWriter.cs @@ -59,7 +59,7 @@ protected override void CreateFile() _fileName = filename; - _jsonWriter = new JsonTextWriter(new StreamWriter(filename, false, Encoding.UTF8)); + _jsonWriter = new JsonTextWriter(new StreamWriter(filename, false, new UTF8Encoding(false))); _jsonWriter.Formatting = PrettyPrint; _jsonWriter.WriteStartObject(); _jsonWriter.WritePropertyName("data"); From bdda15850cd204e14f7e8037c77f11311c23161d Mon Sep 17 00:00:00 2001 From: rvazarkar Date: Thu, 30 Nov 2023 11:21:50 -0500 Subject: [PATCH 2/2] fix: remove bom from comp status --- src/Writers/CompStatusWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Writers/CompStatusWriter.cs b/src/Writers/CompStatusWriter.cs index 26a79a3..b8007f6 100644 --- a/src/Writers/CompStatusWriter.cs +++ b/src/Writers/CompStatusWriter.cs @@ -56,7 +56,7 @@ protected override void CreateFile() var exists = File.Exists(filename); _streamWriter = new StreamWriter( new FileStream(filename, exists ? FileMode.Truncate : FileMode.Create, FileAccess.ReadWrite), - Encoding.UTF8); + new UTF8Encoding(false)); _streamWriter.WriteLine("ComputerName,Task,Status"); }