STX ETX character.

Hi everyone!

I want to sent a bunch of data from xojo client to server (c++) side. The message begins with stx (0x02) and ends with etx (0x03)… On c++ side i can handle this characters by “\x02” and “\x03” string variables… Bu how can i sent them correctly from xojo side…

Not. For example, I used Chr(2) . On server side i received data is “\\002” but it s not seems correct for comparing c++ variable…

Chr will return text encoded as UTF-8. Below code point 128, it doesn’t matter as UTF-8 is the same as ASCII from 0 to 127, but as a rule of thumb you should use ChrB if you want to return a byte.

ChrB( 2 ) will return a single byte with the value of 2 (or \x02, if you prefer).

Thanks…