Made a bad assumption, all outputs will be UTF-8 which is more reliable.
This commit is contained in:
parent
a54bb03723
commit
356c9051a0
@ -484,7 +484,7 @@ namespace TJAConvert
|
|||||||
file.AddRange(lines.GetRange(course.SongDataIndexStart, course.SongDataIndexEnd - course.SongDataIndexStart + 1));
|
file.AddRange(lines.GetRange(course.SongDataIndexStart, course.SongDataIndexEnd - course.SongDataIndexStart + 1));
|
||||||
|
|
||||||
var path = $"{directory}/{fileName}.tja";
|
var path = $"{directory}/{fileName}.tja";
|
||||||
File.WriteAllLines(path, file, encoding);
|
File.WriteAllLines(path, file);
|
||||||
|
|
||||||
var passed = await Convert(path, directory, tjaHash);
|
var passed = await Convert(path, directory, tjaHash);
|
||||||
if (passed < 0)
|
if (passed < 0)
|
||||||
@ -500,7 +500,7 @@ namespace TJAConvert
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
File.WriteAllLines(newPath, lines, encoding);
|
File.WriteAllLines(newPath, lines);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -526,7 +526,7 @@ namespace TJAConvert
|
|||||||
lines.Insert(course.CourseDataIndexStart + 1 + courseData.Count, "");
|
lines.Insert(course.CourseDataIndexStart + 1 + courseData.Count, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
File.WriteAllLines(newPath, lines, encoding);
|
File.WriteAllLines(newPath, lines);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -548,7 +548,7 @@ namespace TJAConvert
|
|||||||
return passed;
|
return passed;
|
||||||
}
|
}
|
||||||
|
|
||||||
File.WriteAllLines(newPath, lines, encoding);
|
File.WriteAllLines(newPath, lines);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -648,7 +648,7 @@ namespace TJAConvert
|
|||||||
|
|
||||||
var encoding = FileEncoding.DetectFileEncoding(tjaPath);
|
var encoding = FileEncoding.DetectFileEncoding(tjaPath);
|
||||||
var lines = ApplyGeneralFixes(File.ReadAllLines(tjaPath, encoding).ToList());
|
var lines = ApplyGeneralFixes(File.ReadAllLines(tjaPath, encoding).ToList());
|
||||||
File.WriteAllLines(newPath, lines, encoding);
|
File.WriteAllLines(newPath, lines);
|
||||||
|
|
||||||
var currentDirectory = Environment.CurrentDirectory;
|
var currentDirectory = Environment.CurrentDirectory;
|
||||||
var exePath = $"{currentDirectory}/tja2bin.exe";
|
var exePath = $"{currentDirectory}/tja2bin.exe";
|
||||||
@ -705,7 +705,7 @@ namespace TJAConvert
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Provide useful output when the metadata is bad
|
//Provide useful output when the metadata is bad
|
||||||
if (result.Contains("invalid Metadata"))
|
if (result.Contains("invalid metadata"))
|
||||||
{
|
{
|
||||||
Console.WriteLine(result);
|
Console.WriteLine(result);
|
||||||
return -2;
|
return -2;
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Folder Include="UDE.CSharp\" />
|
||||||
<Folder Include="References" />
|
<Folder Include="References" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user