Hi guys,

i would like to ask is there anyway to read a txt file with UTF-8 encoding using streamreader or filestream. the txt file is contain some extended ASCII that makes me cannot read the characters properly. I hav tried Encoding.ASCII.GetString(Encoding.UTF8.GetBytes()) but still it return wrong character when it's reading extended ASCII code.

Anyone can enlighten me? any reply would be appreciated.

Open that file with specific encoding style.

rs = new System.IO.StreamReader("file", System.Text.Encoding.ASCII)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.