I have a problem with converting a text file from ANSI to UTF8 in c#. I try to display the results in a browser.
So I have a this text file with many accent characte
This is probably the easiest way:
byte[] ansiBytes = File.ReadAllBytes("inputfilename.txt"); var utf8String = Encoding.Default.GetString(ansiBytes); File.WriteAllText("outputfilename.txt", utf8String);