Skip to content
Tcl Source Code View Ticket
Login

View Ticket

append command sending 0xc080 instead of 0x00

Closed / Out of Date2688825fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-03-16 16:51:10
in tcl version 8.4.4

the following append command appends 0xc080 instead of appending 0x00 

set req_str {<connect load_balancer="Y" />}
append req_str "\0"

when trying to send it to tcp socket

socket $ip $port
fconfigure $sock -buffering line -eofchar >
puts $sock $req_str; flush $sock




Tcl 8.4.4    sending 0xc080  instead of sending 0x00

0x0040:  77ee 3c63 6f6e 6e65 6374 206c 6f61 645f  w.<connect.load_
0x0050:  6261 6c61 6e63 6572 3d22 5922 202f 3ec0  balancer="Y"./>.
0x0060:  800d 0a




but working fine with tcl-8.4.7-4

0x0040:  65c4 3c63 6f6e 6e65 6374 206c 6f61 645f  e.<connect.load_
0x0050:  6261 6c61 6e63 6572 3d22 5922 202f 3e00  balancer="Y"./>.
0x0060:  0d0a
younasa Ticket [2688825fff]: 1 change [History diff]2009-03-16 23:54:21
younasa Ticket [2688825fff]: 1 change [History diff]2009-03-16 23:55:15
msoferplain2009-03-17 00:01:59
allow_comments - 1

So it is a fixed bug: it fails in 8.4.4, works in 8.4.7, current is 8.4.19.

I fail to understand the poster's expectation, as he detected that the bug is already solved all by himself.
ferrieuxplain2009-03-17 03:25:01
Agreed :)
For my culture: is it just a change in the default encoding for sockets, from utf8 to [encoding system], or something deeper ?
patthoytsplain2009-03-17 19:00:53
max committed a fix between 8.4.6 and 8.4.7 and in 8.5 alpha to ensure that our internal NUL utf8 representation was never exposed to the outside world. Seeing 0xc080 in the output data was a bug. (commit of 2004-05-27 on 8.4 branch and 2004-05-07 for 8.5/HEAD).
Log in (anonymous is fine) to add a comment.