0
I get a file (*.txt) that comes as default ANSI encounter.
But every time I read the file it returns me "?" in all characters that have some kind of accent or even the "ç" itself".
Ways I have tried:
File.ReadAllLines(file.FullName, System.Text.Encoding.GetEncoding("ISO-8859-1")
File.ReadAllLines(file.FullName, System.Text.Encoding.GetEncoding("UTF8")
But always when "printo" the String in the console, or write in a file it always returns the accents as "?".
ANSI is not an encoding it is like a "set" of them (like Unicode). For you to read a file, you will need to know its specific encoding. There is not much to do.
– Jéf Bueno
Related: What are the main differences between Unicode, UTF, ASCII, ANSI?
– Jéf Bueno