Bug: Streamreader.ReadLine omits special characters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

reading a textfile with the ReadLine method of a Streamreader objects the
resulting string does not contain the special characters from the source
file: e.g. Paragraph § and all the umlauts are missing.

Is there a work around or solution for this problem?

Thanks in advance
 
If you are using any special encoding format, then you need to specify that
when you open the stream.

Dim sr As New StreamReader(fs, Encoding.GetEncoding(1256))

Rgds,
Anand M
VB.NET MVP
http://www.dotnetindia.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top