iOS memoryblock

i am new to iOS and playing with TCPSockets. I connect to a server and want to display the result in a iOSLabel.

Here is the DataAvailable Event:

Var data As MemoryBlock
data = me.ReadData(me.BytesAvailable)

Var t As Text = Xojo.Core.TextEncoding.utf8.ConvertDataToText(data)

but when debugged I get a runtimeException with “The data could not be converted to text with this encoding.”

Any suggestions?

it set allowLossy As Boolean=true and now it works…