By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,327 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,327 IT Pros & Developers. It's quick & easy.

How to read a text file populated by multi-byte chars(e.g. Chinese chars )?

P: n/a

If I create a text file like "Sub WriteTextFile" I can read the file
"file1.txt" using "Sub ReadTextFile" correctly, Whereas If I create the same
text file using NotePad.exe I can only read out these 2 strings: " is a
Chinese person's name" and "English". Need I make some conversion?

Private Sub WriteTextFile
Dim file1 As New StreamWriter("file1.txt")

With file1
.WriteLine(" is a Chinese person's name")
End With
End Sub

Private Sub ReadTextFile
Dim file2 As New System.IO.StreamReader("file1.txt")
Dim words As String = file.ReadToEnd()
End Sub

Thanks in advance,

Nov 1 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.