質問編集履歴
1
コードの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,4 +5,19 @@
|
|
5
5
|
3.ebcdicは改行が存在しないのですが、bufferedReaderのようにまとめて処理するにはどうすればいいのでしょうか。
|
6
6
|
4.vb.netからpowershellを呼び出して変換することは可能でしょうか。また、どのようにすればいいのでしょうか。
|
7
7
|
|
8
|
-
よろしくお願いします。
|
8
|
+
よろしくお願いします。
|
9
|
+
|
10
|
+
以下解決内容
|
11
|
+
作成コード:
|
12
|
+
Dim enc_ebcdic As Encoding = Encoding.GetEncoding("IBM290")
|
13
|
+
Dim enc_sjis As Encoding = Encoding.GetEncoding("Shift_JIS")
|
14
|
+
|
15
|
+
'以下を分解したもの
|
16
|
+
'Dim ebcdicByteCode As Byte() = File.ReadAllBytes(読込ebcdicファイルpath)
|
17
|
+
'Dim ebcdicString As Char() = enc_ebcdic.GetChars(ebcdicByteCode)
|
18
|
+
|
19
|
+
Dim ebcdicString As String = File.ReadAllText(読込ebcdicファイルpath, enc_ebcdic)
|
20
|
+
|
21
|
+
Dim sw As StreamWriter = New StreamWriter(書出ファイルpath, False, enc_sjis)
|
22
|
+
sw.Write(ebcdicString )
|
23
|
+
sw.Close()
|