Missing chars after reading line

G

Guest

Hi,

I'm just developing a .net (compact) application and therefore make use of
the StreamReader class - and especially the ReadLine function. Now, when I
try to read lines from a text file that includes 'german' strings with
specific chars (like ä,ü,ö, etc.) they do not appear in the returned string.
What's wrong here?

By the way, if it is of any importance, I currently use an english version
of VS.net 2003 - that's why there's also an english .net framework installed
on the pocket pc I'm testing on.

Greetings,
Andreas
 
J

Jon Skeet [C# MVP]

Andreas said:
I'm just developing a .net (compact) application and therefore make use of
the StreamReader class - and especially the ReadLine function. Now, when I
try to read lines from a text file that includes 'german' strings with
specific chars (like ?,?,?, etc.) they do not appear in the returned string.
What's wrong here?

By the way, if it is of any importance, I currently use an english version
of VS.net 2003 - that's why there's also an english .net framework installed
on the pocket pc I'm testing on.

Chances are you're using the wrong encoding.

See http://www.pobox.com/~skeet/csharp/unicode.html
 

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

Top