[Standards] Binary data over XMPP

Tomasz Sterna tomek at xiaoka.com
Tue Nov 6 15:25:44 UTC 2007

Dnia 06-11-2007, Wt o godzinie 14:56 +0000, Dave Cridland pisze:
> I'm not following something. So encode the octets #x00 #x01 #x02
> #x5D #x3E, and tell me what you get.

Like this:

Binary <-> Encoded
0x00 <-> 0xC4, 0x80
0x01 <-> 0xC4, 0x81
0x20 <-> 0x20
0x21 <-> 0x21
0x7F <-> 0x7F
0x80 <-> 0xC2, 0x80
0xFF <-> 0xC3, 0xBF

> I get three bytes that are not legal in a CDATA section, followed by  
> a sequence of bytes which decode (via UTF-8) to "]]>", which in turn  
> would end the CDATA section.

Good point.
We either transfer this chunk in &...; escaping, or just transcode 0x3E
or 0x5D bytes to 2byte UTF-8 character. (Maybe '>' to '»' :)

  /\_./o__ Tomasz Sterna
 (/^/(_^^'  Xiaoka.com
._.(_.)_  XMPP: smoku at xiaoka.com

More information about the Standards mailing list