Skip to content

Commit

Permalink
Merge pull request #428 from Tuupertunut/patch-1
Browse files Browse the repository at this point in the history
Change saved song file encoding to UTF-8 without BOM
  • Loading branch information
basisbit authored Dec 28, 2023
2 parents 661be85 + f642567 commit 18869a3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public static class UltraStarSongFileWriter
public static void WriteFile(string absolutePath, SongMeta songMeta)
{
string txtFileContent = GetTxtFileContent(songMeta);
File.WriteAllText(absolutePath, txtFileContent, Encoding.UTF8);
// Do not use Encoding.UTF8 as it will produce a BOM.
File.WriteAllText(absolutePath, txtFileContent, new UTF8Encoding());
}

private static string GetTxtFileContent(SongMeta songMeta)
Expand Down

0 comments on commit 18869a3

Please sign in to comment.