besoft Active Member Licensed User Longtime User Mar 13, 2016 #1 Through serial port i send data : "L1"&CHR(255).If I look at the terminal, get on the output of a different sign as if sent from Visual Basic. I suppose that is different ASCII table.This happens from the sign CHR(127) forward. How can I change this table? THX
Through serial port i send data : "L1"&CHR(255).If I look at the terminal, get on the output of a different sign as if sent from Visual Basic. I suppose that is different ASCII table.This happens from the sign CHR(127) forward. How can I change this table? THX
Erel B4X founder Staff member Licensed User Longtime User Mar 13, 2016 #2 Don't confuse characters and bytes. If you want to send the byte value 255 then send it directly: B4X: AStream.Write(Array As Byte(255)) Upvote 0
Don't confuse characters and bytes. If you want to send the byte value 255 then send it directly: B4X: AStream.Write(Array As Byte(255))
besoft Active Member Licensed User Longtime User Mar 15, 2016 #3 Solved Instead of : B4X: astream.Write(("L1" & Chr(Round2(L1_S.Value, 0)) & Chr(13) & Chr(10)).GetBytes("UTF-8")) I used: B4X: astream.Write(("L1" & Chr(Round2(L1_S.Value, 0)) & Chr(13) & Chr(10)).GetBytes("Windows-1252")) Everything works as intended THX Upvote 0
Solved Instead of : B4X: astream.Write(("L1" & Chr(Round2(L1_S.Value, 0)) & Chr(13) & Chr(10)).GetBytes("UTF-8")) I used: B4X: astream.Write(("L1" & Chr(Round2(L1_S.Value, 0)) & Chr(13) & Chr(10)).GetBytes("Windows-1252")) Everything works as intended THX