|
Hey All
Having an issue with a binary string in TCL. I receive a binary string
length 12, from a snac response and I have to send that string back to
a SAPI server via snac request.
Before that happens I post the string in a hidden form field. I think TCL
is interrupting one of the characters in the string as a null terminator
and truncating the string.
I've tried encoding the string and writing the string as binary to a file
to prevent the this from happening, but the string continues to be
corrupted.
I've included an example of what the data looks like before and after the
form post. Encoded and non-encoded.
The first set of log messages are the binary string pulled from the SNAC
and printed using snac.hexprint and an encoded version.
[14/Dec/2004:15:53:54][11228.112][-conn:server1::103] Notice: binary_str = 0000 0000 0234 41bf 528c 000d b39c *...4A�R...�. * [14/Dec/2004:15:53:54][11228.112][-conn:server1::103] Notice: encoded_binary = AAACNEG/UowA The second set is the same string
encoded and decode after being pulled from the form data.
[14/Dec/2004:15:54:08][11228.114][-conn:server1::105] Notice: binary_str = 0000 0000 0234 41bf 528c 00 *...4A�R.. * [14/Dec/2004:15:54:08][11228.114][-conn:server1::105] Notice: encoded_binary_str = 0000 4141 4143 4e45 472f 556f 7741 *AAACNEG/UowA * Any idea what's happening?
Thanks,
Brooks
|
