V
Vaidas Gudas
Code:
Dim enc As New System.Text.ASCIIEncoding
Dim serverbuff(1024), buff(0) As Byte
Dim count, bytes As Integer
Dim stream As NetworkStream
stream = o.GetStream()
While 1 = 1
bytes = stream.Read(buff, 0, 1)
If bytes = 1 Then
serverbuff(count) = buff(0)
count = count + 1
If buff(0) = Asc(vbLf) Then
Exit While
End If
Else
Exit While
End If
End While
Return enc.GetString(serverbuff, 0, count)
I am using POP 3 protocol and I am rading the data from exchange server.
I am geting the data from POP3 in string format, but some character, witch
it is not Latin characters is enncoded, and I need to decode to Lithuanian
character set. How to make this.
Dim enc As New System.Text.ASCIIEncoding
Dim serverbuff(1024), buff(0) As Byte
Dim count, bytes As Integer
Dim stream As NetworkStream
stream = o.GetStream()
While 1 = 1
bytes = stream.Read(buff, 0, 1)
If bytes = 1 Then
serverbuff(count) = buff(0)
count = count + 1
If buff(0) = Asc(vbLf) Then
Exit While
End If
Else
Exit While
End If
End While
Return enc.GetString(serverbuff, 0, count)
I am using POP 3 protocol and I am rading the data from exchange server.
I am geting the data from POP3 in string format, but some character, witch
it is not Latin characters is enncoded, and I need to decode to Lithuanian
character set. How to make this.