| Set Stream = CreateObject( "ADODB.Stream" )
Set Fso = CreateObject( "Scripting.FileSystemObject" )
Stream.Open
Stream.Type = 2 ' テキスト
Stream.Charset = "euc-jp"
Stream.LoadFromFile "euc_lf.txt"
Stream.Position = 0
Stream.LineSeparator = 10 ' LF
Set objHandle = Fso.OpenTextFile( "Shift_Jis_crlf.txt", 2, True )
Do While not Stream.EOS
' -2 は、ストリームから次の行を読み取ります
objHandle.WriteLine Stream.ReadText( -2 )
Loop
objHandle.Close
Stream.Close
| |