IOStream does not read special characters

  • Thread starter Thread starter Marcus O via DotNetMonster.com
  • Start date Start date
M

Marcus O via DotNetMonster.com

Hello,

I am fairly new to vb.net and I have a problem when reading from text file. The file contains characters not found in English (e.g. ?, ?, ?). When I am doing a ReadLine those characters are skipped by vb.net. Does anyone know what to do to fix my problem?

/m
 
Marcus O via DotNetMonster.com said:
I am fairly new to vb.net and I have a problem when reading from text
file. The file contains characters not found in English (e.g. ?, ?, ?).
When I am doing a ReadLine those characters are skipped by vb.net. Does
anyone know what to do to fix my problem?

Depending on the encoding that was used to write the file, specify an
encoding ('System.Text.Encoding.*') in the 'StreamReader''s constructur.
BTW: I don't see the characters that are not read (they are relplaced by
question marks in your message.
 

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