vb中把一个txt文件从ANSI编码转成unicode编码
发布网友
发布时间:2024-10-04 05:51
我来回答
共2个回答
热心网友
时间:2024-11-01 18:42
Dim fso As Object
Const forreading = 1
Private Sub command1_lick()
Set fso = CreateObject("scripting.filesystemobject")
Set f = fso.opentextfile("F:\1.txt", forreading, False, -1)
ff = f.readall
f.Close
Open "F:\2.txt" For Output As #1
Print #1, ff
Close #1
End Sub
热心网友
时间:2024-11-01 18:43
Const ForReading = 1
Const ForWritting = 2
Set FSO = CreateObject("Scripting.FileSystemObject")
Set f1 = FSO.OpenTextFile("F:\ANSI.txt", ForReading, False)
Set f2 = FSO.OpenTextFile("F:\Unicode.txt", ForWritting, True, -1)
f2.Write f1.ReadAll
f1.Close
f2.Close