Skip to content

Commit

Permalink
force utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
sargeantPig committed Oct 20, 2023
1 parent 5a24f37 commit a04da91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions RTWLibPlus/parsers/DepthParse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public List<IbaseObj> Parse(string[] lines, ObjectCreator creator, char splitter
}
public string[] ReadFile(string path, bool removeEmptyLines = true)
{
StreamReader streamReader = new StreamReader(path);
StreamReader streamReader = new StreamReader(path, Encoding.UTF8);
string text = streamReader.ReadToEnd();
streamReader.Close();

Expand All @@ -67,7 +67,7 @@ public string[] ReadFile(string path, bool removeEmptyLines = true)
}
public string ReadFileAsString(string path)
{
StreamReader streamReader = new StreamReader(path);
StreamReader streamReader = new StreamReader(path, Encoding.UTF8);
string text = streamReader.ReadToEnd();
streamReader.Close();
return text;
Expand Down
2 changes: 1 addition & 1 deletion RTWLib_Tests/wrappers/Tests_ds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void dsWholeFile()
[TestMethod]
public void dsGetItemsByIdentSettlements()
{
var ds = dp.ReadFile(RFH.CurrDirPath("resources", "descr_strat.txt"), true);
var ds = dp.ReadFile(RFH.CurrDirPath("resources", "descr_strat.txt"), false);
var dsParse = dp.Parse(ds, Creator.DScreator);
var parsedds = new DS(dsParse, config);

Expand Down

0 comments on commit a04da91

Please sign in to comment.