Ville,
I've never needed to call GetDecoder directly.
Normally I apply the encoding I need to the Stream object I am using via a
StreamReader class, something like:
Dim stream As Stream ' file or network stream where your data is
Dim encoding As Encoding = Encoding.GetEncoding("ISO-8859-1")
Dim reader As New StreamReader(stream, encoding)
Dim line As String = reader.ReadLine()
If I have the encoded text in a Byte array, then I simply use the GetBytes &
GetString method of the encoding object.
Dim bytes() As Byte = encoding.GetBytes("this is a string")
Dim str As String = encoding.GetString(bytes)
Hope this helps
Jay
"Ville Pirhonen" <vi************@profimill.com> wrote in message
news:Ot**************@TK2MSFTNGP09.phx.gbl...
is there easy way encode ISO-8859-1 (7-bit) to unicode?
example..
=?iso-8859-1?Q?=F6=E4?=
to
öä
I tried Dim iso8859 As System.Text.Encoding =
System.Text.Encoding.GetEncoding("ISO-8859-1")
and getDecoder, but I didn't manage to get it work...
Cheers, Ville