How to reproduce:
Very easy - save file in UTF-8 take all lines from file, when file gets empty encoding changes to ANSI automatically.
WORKAROUND:
Save line in file using c# and line will be saved in UTF-8 without BOM
string path = @"C:\MyTest.txt";
// Append text in UTF-8
using...