Reputation: 70
I am developing a websocket server and I need to send to the client '\x81' encoded in utf-8 and when i do:
chr(129).encode('utf-8')
it returns b'\xc2\x81'
.
I expect b\x81
.
Thank you very much!
ps: i am complete newbie
Finally I have found it. I have used it bytes([129, 21, 34])
Upvotes: 0
Views: 430