Problem with Encoding Losing Accent

Asked

Viewed 14 times

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 "?".

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.