Lotusscript生成TXT文件编码问题

'问题:生成的txt没办法导入网银。最后考虑是编码问题,果然,把utf-8编码修改为gb2313即可。
Dim filepath As String Dim fileName As String Dim OutputFile As String OutputFile
= filepath + fileName +".txt" If Dir$(OutputFile) <> "" Then Kill OutputFile End If Dim objStream As Variant
Set objStream
= CreateObject("ADODB.Stream") objStream.Type = 2 objStream.Mode = 3 'objStream.Charset = "utf-8" objStream.Charset = "gb2312"  '通过Chartset设置编码。 objStream.Open objStream.WriteText "OBSSSTART",1 objStream.WriteText "OBSSEND",1 objStream.SaveToFile OutputFile,2 objStream.Flush objStream.Close Set objStream = Nothing

 

posted @ 2020-04-19 15:02  活捉火星人  阅读(222)  评论(0编辑  收藏  举报