Original Post
Hi, According to http://www.w3.org/TR/wbxml/ :
Quote:how was 0xA0 split up to 0x81 and 0x20? can it also be split up to 0x71 and 0x31? how to know when to split up (0xA0's value is less than a char also, but they split it up to two bytes). thanks! [Edited by - _nomad_ on October 25, 2005 1:43:10 AM]
Multi-byte Integers This encoding uses a multi-byte representation for integer values. A multi-byte integer consists of a series of octets, where the most significant bit is the continuation flag and the remaining seven bits are a scalar value. The continuation flag indicates that an octet is not the end of the multi-byte sequence. A single integer value is encoded into a sequence of N octets. The first N-1 octets have the continuation flag set to a value of one (1). The final octet in the series has a continuation flag value of zero (0). The remaining seven bits in each octet are encoded in a big-endian order, eg, most significant bit first. The octets are arranged in a big-endian order, eg, the most significant seven bits are transmitted first. In the situation where the initial octet has less than seven bits of value, all unused bits must be set to zero (0). For example, the integer value 0xA0 would be encoded with the two-byte sequence 0x81 0x20. The integer value 0x60 would be encoded with the one-byte sequence 0x60.