vb.net 按行读取文件时,英文没错,但中文就出现乱码,请教为何?

2024-12-16 12:05:49
推荐回答(1个)
回答1:

Dim sr As New System.IO.StreamReader(Application.StartupPath & "\1.txt",System.Text.Encoding.GetEncoding("GB2312")) 中文默认是 GB2312格式的.