PC Review


Reply
Thread Tools Rate Thread

Bug: Streamreader.ReadLine omits special characters

 
 
=?Utf-8?B?SGVucnk=?=
Guest
Posts: n/a
 
      26th Nov 2004
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
--
Best regards

Henry
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QW5hbmRbTVZQXQ==?=
Guest
Posts: n/a
 
      26th Nov 2004
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

"Henry" wrote:

> 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
> --
> Best regards
>
> Henry

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
StreamReader.ReadLine() Tarren Microsoft C# .NET 1 25th Apr 2005 07:55 PM
Re: VB.NET STREAMREADER READLINE BUG Samuel R. Neff Microsoft VB .NET 4 8th Mar 2005 07:26 PM
Re: VB.NET STREAMREADER READLINE BUG Stefan Microsoft VB .NET 0 7th Mar 2005 08:34 PM
StreamReader doesn't pick up special characters Max Microsoft ASP .NET 4 18th Nov 2004 12:52 AM
Bug in StreamReader.ReadLine()? It reads special chars wrong... VMI Microsoft C# .NET 3 7th Aug 2004 07:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:17 AM.