Hello, I have a problem converting a hexadecimal string to unicode text and
save it to a file.
I do not know how to make it, so I ask here...
And I had much problems replacing unicode strings directly without first
converting to hex, so I think that is the best method now.
Thats the basic structure:
Dim enc As System.Text.Encoding = New System.Text.UnicodeEncoding(False,
False)
Using f As New IO.FileStream(foundFile, IO.FileMode.Open,
IO.FileAccess.Read)
Dim b As Integer = f.ReadByte()
Dim output As New Text.StringBuilder
Do While b >= 0
output.Append(b.ToString("X2"))
b = f.ReadByte()
Loop
file1 = output.ToString
End Using
Dim outputhex As String = Replace(file1, hex1.Text, hex2.Text,
1, -1)
Microsoft.VisualBasic.FileIO.FileSystem.WriteAllTe xt("test.uni",
outputhex, False, enc)
I will be thankful for every answer.
kenny