In the following piece of code the value Chr(254) is not properly translated.
The receiving program gets everything right except that Chr(254) has changed into Chr(195).
Any idea what I am doing wrong?
Rolf
PS:
Just noted in the Debugger that Chr(254) gets translated into Chr(-61) & Chr(-66). Number of bytes became 21 instead of 20.
B4X:
t = "&&ID|" & MyIP & "|1|42" & Chr(254)
Buffer = t.GetBytes("UTF8")
OutputStream1.WriteBytes(Buffer,0,t.Length)
The receiving program gets everything right except that Chr(254) has changed into Chr(195).
Any idea what I am doing wrong?
Rolf
PS:
Just noted in the Debugger that Chr(254) gets translated into Chr(-61) & Chr(-66). Number of bytes became 21 instead of 20.
Last edited: