G
Guest
I have a binary file and I want to view it completely in hex.
I tried it with following code...:
Private Function getHex(ByVal str As String) As String
Dim enc As New UTF8Encoding
Dim output As New StringBuilder
For Each b As Byte In enc.GetBytes("D:\test.rsc")
output.Append(Hex(b))
Next
Return output.ToString
End Function
but if I compare the result with a hexviewer, the values are different. On
some places there are some more zeros and on others there are not enough of
them.
For example it should look like "04F0050045" but it looks like "40F5045".
I tried changing the encofing already but without any success.
Thank you in advance for helping me!
I tried it with following code...:
Private Function getHex(ByVal str As String) As String
Dim enc As New UTF8Encoding
Dim output As New StringBuilder
For Each b As Byte In enc.GetBytes("D:\test.rsc")
output.Append(Hex(b))
Next
Return output.ToString
End Function
but if I compare the result with a hexviewer, the values are different. On
some places there are some more zeros and on others there are not enough of
them.
For example it should look like "04F0050045" but it looks like "40F5045".
I tried changing the encofing already but without any success.
Thank you in advance for helping me!