Skip to content

Commit 879328c

Browse files
committed
2 parents d077c68 + 2673a93 commit 879328c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CustomCommands/Services/LoadJson.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Text;
12
using System.Text.Json;
23
using CustomCommands.Interfaces;
34
using CustomCommands.Model;
@@ -48,7 +49,11 @@ public List<Commands> GetCommandsFromJsonFiles(string path)
4849

4950
foreach (var file in files)
5051
{
51-
var json = File.ReadAllText(file);
52+
string json;
53+
54+
// Read Unicode Characters
55+
using (StreamReader sr = new StreamReader(file, Encoding.UTF8))
56+
json = sr.ReadToEnd();
5257

5358
// Validate the JSON file
5459
if (!IsValidJsonSyntax(file))

0 commit comments

Comments
 (0)