Reading an UTF8 file, problems

c#, file-io, utf-8

Solution

I can't say what the problem is with LINQPad, but the console is probably set to a different code page and doesn't have those characters in its font. See Unicode characters in Windows command line - how?

Problem

I'm reading a text file with UTF-8 encoding. Some lines of file includes accents. Something like this: `EdiçÃo`. But on Console and LINQPad output `Edi��o` instead of. Here's how to I'm reading the file: ``` File.ReadAllLines("foo.txt", Encoding.UTF8); ``` How to fix this?

Original source

Related problems