Input encoding and tabulation
This commit is contained in:
1 parent
0f77306a0c
commit
b3e85c62e5
2 files changed
+6
-2
No files matched your search
@@ -15,4 +15,8 @@
|
||||
<None Remove="Model\NewFile1.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -16,7 +16,7 @@ namespace BoerseDataConvert
|
||||
public Reader(string adr, string[] filesNames)
|
||||
{
|
||||
fileInd = 0;
|
||||
reader = new StreamReader($@"{adr}/{filesNames[fileInd]}");
|
||||
reader = new StreamReader($@"{adr}/{filesNames[fileInd]}", CodePagesEncodingProvider.Instance.GetEncoding(1252), true);
|
||||
this.adr = adr;
|
||||
this.filesNames = filesNames;
|
||||
reader.ReadLine();
|
||||
@@ -28,7 +28,7 @@ namespace BoerseDataConvert
|
||||
{
|
||||
fileInd++;
|
||||
reader.Close();
|
||||
reader = new StreamReader($@"{adr}/{filesNames[fileInd]}");
|
||||
reader = new StreamReader($@"{adr}/{filesNames[fileInd]}", CodePagesEncodingProvider.Instance.GetEncoding(1252), true);
|
||||
RecordController.NextFile(filesNames[fileInd]);
|
||||
s = reader.ReadLine();
|
||||
s = reader.ReadLine();
|
||||
|
||||
Reference in new issue
Block a user