Menu

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

closed-fixed
5
2012-05-11
2000-10-26
Anonymous
No

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 el_supremo@deja-news.com

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

Discussion

  • Donal K. Fellows

    • labels: 104238 --> 104681
     
  • Donal K. Fellows

    • labels: 104681 --> 105669
     
  • Kevin B KENNY

    Kevin B KENNY - 2001-02-26
    • assigned_to: nobody --> kennykb
     
  • Kevin B KENNY

    Kevin B KENNY - 2001-02-26
    • milestone: 102425 --> 102413
     
  • Don Porter

    Don Porter - 2001-04-03
    • labels: 105669 --> 28. dde Package
     
  • Kevin B KENNY

    Kevin B KENNY - 2003-03-23
    • assigned_to: kennykb --> patthoyts
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-05-11

    Duplicate of #227482, which is long fixed.

     
  • Jan Nijtmans

    Jan Nijtmans - 2012-05-11
    • assigned_to: patthoyts --> nijtmans
    • status: open --> closed-fixed