On 22/12/17 08:14, Olivier Delbeke wrote:
Hi Chris & all,
Your solution (defining the data as unicode) works :
[python] sender.send( Message(body="[MESSAGE]") ) =>
to_string(message.body())=="b"[MESSAGE]"" in C++ at the receiver side
[python] sender.send( Message(body=u"[MESSAGE]") ) =>
to_string(message.body())=="[MESSAGE]" in C++ at the receiver side
The difference in the data being sent is minimal :
"[MESSAGE]"
[0x21dec70]:0 -> @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"1",
message-format=0, settled=false, more=false, resume=false, aborted=false, batchable=false] (77)
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00$\x00\x00\x00\x0d@@@@@@\xa3\x00\xa3\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa0\x09[MESSAGE]"
u"MESSAGE"
[0x1e61c70]:0 -> @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"1",
message-format=0, settled=false, more=false, resume=false, aborted=false, batchable=false] (77)
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00$\x00\x00\x00\x0d@@@@@@\xa3\x00\xa3\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x09[MESSAGE]"
If I'm reading correctly, I just see a \xa0 -> \xa1 (2 bytes before the message)
Does this field represent the data encoding ?
Yes (0xa0 is binary, 0xa1 is string)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]