M
Ma³y Piotruœ
Hello,
Could you help me please with encoding transformations in .NET? I am
beginner.
I have some code that nearly works - but I have problem with
converting from fileEncoding to Unicode (Strings are in Unicode).
Dim fe As Encoding 'fileEncoding
Dim ue As Encoding = Encoding.Unicode
Dim fb(0) As Byte 'bytes read
Dim ub As Byte() 'output bytes
....
fe = Encoding.GetEncoding(...) 'fe pobierane z Web.configa
....
fb(0) = br.ReadByte() 'here fb(0) > 0
ub = Encoding.Convert(fe, ue, fb) 'ERROR here: ub is null
Could you explain me please why ub does not contain Unicode bytes? How
to correct the code?
Thank you very much.
(MP)
Could you help me please with encoding transformations in .NET? I am
beginner.
I have some code that nearly works - but I have problem with
converting from fileEncoding to Unicode (Strings are in Unicode).
Dim fe As Encoding 'fileEncoding
Dim ue As Encoding = Encoding.Unicode
Dim fb(0) As Byte 'bytes read
Dim ub As Byte() 'output bytes
....
fe = Encoding.GetEncoding(...) 'fe pobierane z Web.configa
....
fb(0) = br.ReadByte() 'here fb(0) > 0
ub = Encoding.Convert(fe, ue, fb) 'ERROR here: ub is null
Could you explain me please why ub does not contain Unicode bytes? How
to correct the code?
Thank you very much.
(MP)