Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2012-05-11
17:39 • Closed ticket [219185ffff]: dde only handles UTF-8 data (-binary patch available... artifact: 4b078ae4da user: nijtmans
2009-07-29
17:26 • Ticket [219185ffff]: 1 change artifact: b30d14db5a user: dkf
17:25 • Ticket [219185ffff]: 4 changes artifact: 3cc52c6007 user: dkf
2008-11-28
07:30 • Ticket [219185ffff]: 1 change artifact: 42eca719e8 user: patthoyts
07:30 • Ticket [219185ffff]: 4 changes artifact: cf852fbe92 user: patthoyts
2003-03-24
04:23 • Ticket [219185ffff]: 1 change artifact: af1fda4b5e user: kennykb
2001-04-04
03:46 • Ticket [219185ffff]: 1 change artifact: 3abbdef110 user: dgp
2001-02-27
06:02 • Ticket [219185ffff]: 1 change artifact: 7e20a11829 user: kennykb
05:58 • Ticket [219185ffff]: 3 changes artifact: 06e1018b01 user: kennykb
2001-02-07
22:56 • Ticket [219185ffff]: 1 change artifact: fda5f35e13 user: dkf
2000-11-23
22:46 • Ticket [219185ffff]: 1 change artifact: e2db881ec5 user: dkf
2000-10-26
05:03 • New ticket [219185ffff]. artifact: adf0f9b1f1 user: nobody

dde only handles UTF-8 data (-binary patch available)

Closed / Fixed219185ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 15 years ago
Descriptionplain2000-10-26 05:03:05
OriginalBugID: 2276 Bug
Version: 8.1.1
SubmitDate: '1999-06-22'
LastModified: '2000-09-07'
Severity: MED
Status: Assigned
Submitter: techsupp
ChangedBy: hobbs
OS: All Windows
Machine: X86
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name: Peter Hardie

Comments:
An optional "-binary" argument has been added to the dde request command
    to
    force it to receive binary data rather than a null-terminated string. I
    don't think there is a reliable way for the program to tell whether the
    returned data are binary or a string and so the user must tell the
    program via the optional argument.
    Users should be aware that it appears that the windows DDE returns a
    data length of 28 for any data of that length or shorter (even when it
    is returning a string). They must, therefore, still have some reliable
    way of determining where the end of the data occurs.
    In the sample script included at the above URL, the binary data returned
    by Netscape's WWW_ListWindows topic are terminated by a double word zero
    (where netscape's double word is 32 bits) and thus even if there are
    fewer than 6 windows open, the end of the data can be reliably detected.
    
    Pete   [email protected]

DesiredBehavior:
In V1.0 of TCL's DDE package, the "dde request" command cannot handle
    the case where binary data are returned instead of a null-terminated
    string.

Patch:
Two patch versions are available at this URL along with a readme.txt and
a small sample script to test the patch once it is installed.

http://members.home.net/el.supremo/tcl_files/reqbinary/

PatchFiles:
tclwindde.c



From Bonnet:

Tcl seems to always send the string rep of an object, whatever its
internal rep may be (DdeServerProc in win/tclWinDde.c). The result
of an encoding converted string is a byte array that holds the
converted string, however what is sent is the UTF-8 string. So Tcl
should check for the internal rep to see whether it is a byte array
and use it instead. On Windows NT, Tcl could also use Unicode instead
of ANSI. I believe the same is true when sending data to Tcl: data is
sent as ANSI, but Tcl expects UTF-8. Tcl-to-Tcl communication works
OK because both expect UTF-8.

See also: http://www.deja.com/=dnc/getdoc.xp?AN=666313424 
-- 09/07/2000 hobbs
dkf Ticket [219185ffff]: 1 change [History diff]2000-11-23 22:46:57
dkf Ticket [219185ffff]: 1 change [History diff]2001-02-07 22:56:30
kennykb Ticket [219185ffff]: 3 changes [History diff]2001-02-27 05:58:16
kennykb Ticket [219185ffff]: 1 change [History diff]2001-02-27 06:02:36
dgp Ticket [219185ffff]: 1 change [History diff]2001-04-04 03:46:15
kennykb Ticket [219185ffff]: 1 change [History diff]2003-03-24 04:23:03
patthoytsplain2008-11-28 07:30:16
IP - Comment Removed: 92.238.221.8
patthoyts Ticket [219185ffff]: 1 change [History diff]2008-11-28 07:30:27
dkfplain2009-07-29 17:25:45
IP - Comment Removed: 130.88.1.31
dkf Ticket [219185ffff]: 1 change [History diff]2009-07-29 17:26:18
nijtmansplain2012-05-11 17:39:21
allow_comments - 1

Duplicate of #227482, which is long fixed.
Log in (anonymous is fine) to add a comment.