James,
Are you saying that StreamReader.ReadLine itself is having problems, where
as StreamReader.Read is not having a problem?
Or that you are simply having problems reading a BIG-5 encoded file?
I don't have any BIG-5 data files to actually test this, however have you
tried something like:
Dim big5 As System.Text.Encoding =
System.Text.Encoding.GetEncoding("BIG5")
Dim input As New StreamReader("mybig5.txt", big5)
Dim line As String = input.ReadLine()
Do Until line Is Nothing
' process the line here
line = input.ReadLine()
Loop
input.Close()
For information on Unicode and Encoding in .NET see:
http://www.yoda.arachsys.com/csharp/unicode.html
Hope this helps
Jay
"James Wong" <cp*****@commercialpress.com.hk.NO_SPAM> wrote in message
news:eW**************@TK2MSFTNGP11.phx.gbl...
Dear all,
I'm using StreamReader to read a text file containing BIG-5 data and found
that no matter which encoding method in StreamReader's construction
parameter, the BIG-5 contents become garbage under ReadLine method. Does
anybody have any idea on this issue?
Thanks for your attention and kindly help!
Regards,
James Wong