SloppyCoder <ti******@hotmail.com> wrote:
I am having a problem preparing a UTF8 string for IPP (internet
printing protocol) transmission. Converting integers until 639 goes
well, but beyond this, in case of 640, results in an extra byte(?).
It shoot be 0x00, 0x00, 0x02 0x80 but I get : 00, 0x00, 0x02 0xc2
0x80.
Can somebody give me a hint, please?
You seem to be confusing character data and binary data. I very much
doubt that the printing protocol *really* expects its data to come as
UTF-8 encoded strings which themselves aren't really text but contain
unicode characters for binary values. I'd be very surprised if numbers
such as 129 are doing what you expect them to either.
You're converting into UTF-8 and back at the moment - do you have a
document describing what is actually expected at the other end? What
are *you* expecting?
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too