主题:求解乱码问题(急!急!急!)谢!谢!谢!
在用vs 2003 写代码的时候,将文件里的内容读出来,然后显示在TextBox里,出现乱码,为什么?怎么解决?
谢谢,新手。
弄了一天了都,没弄出来呢,本人太笨,请大侠帮忙。
Dim fstream As New FileStream("D:\work\Resume.txt", FileMode.Open)
Dim intFilelength As Integer = fstream.Length
Dim filebyte(intFilelength) As Byte
Dim utf8 As System.Text.UTF8Encoding = New System.Text.UTF8Encoding
strFilemessage = New String(utf8.GetString(filebyte))
txtResume.Text = strFilemessage这样不行
Dim fstream As New FileStream("D:\work\Resume.txt", FileMode.Open)
Dim stream As New StreamReader(fstream)
Dim stream As New StreamReader(fstream, New System.Text.UTF8Encoding)
strFilemessage = stream.ReadToEnd()
txtResume.Text = strFilemessage这样也不行
怎么办?
谢谢,新手。
弄了一天了都,没弄出来呢,本人太笨,请大侠帮忙。
Dim fstream As New FileStream("D:\work\Resume.txt", FileMode.Open)
Dim intFilelength As Integer = fstream.Length
Dim filebyte(intFilelength) As Byte
Dim utf8 As System.Text.UTF8Encoding = New System.Text.UTF8Encoding
strFilemessage = New String(utf8.GetString(filebyte))
txtResume.Text = strFilemessage这样不行
Dim fstream As New FileStream("D:\work\Resume.txt", FileMode.Open)
Dim stream As New StreamReader(fstream)
Dim stream As New StreamReader(fstream, New System.Text.UTF8Encoding)
strFilemessage = stream.ReadToEnd()
txtResume.Text = strFilemessage这样也不行
怎么办?