Skip to content
Tcl Source Code History Of Ticket 473946ffffffffff
Login

History Of Ticket 473946ffffffffff

Artifacts Associated With Ticket 473946ffffffffff

  1. Ticket change [6ac449f288] (rid 128209) by jmphilippe on 2001-10-23 06:45:58:

    1. assignee initialized to: "kennykb"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I'm using Tcl 8.3.3 as a DDE server under Windows and 
      I encounter problems with special characters. If a 
      text variable is created by tcl, requesting the 
      variable content doesn't give the correct string for 
      special characters.
      For example, you have a text file that contains a text 
      with the copyright sign:
      {test string: ©}
      You load that file in tcl (which converts it to 
      unicode I assume) and get back its content with a
      DDERequest, then you get (and I hope I'm not the only 
      one): {test string: ©}, and that's the same for 
      every "exotic" character.
      I tried with different DDE client (Excel VB, Matlab 
      and Aphelion, an image processing software), all give 
      the same result. I also tried to change character 
      encoding with no success (with 'encoding system' 
      and 'encoding convertto'). Characters seem to be 
      always sent as unicode.
      Note that when the DDE client creates a string in tcl 
      (with something like 'DDEExecute DDE_Id, {set Texte 
      blabla}'), it gets exactly the same text while 
      requesting the variable (with 'DDERequest DDE_Id, 
      Texte') whatever the string is. Things get wrong only 
      when the string is created by tcl.
      
      
    4. foundin initialized to: "obsolete: 8.3.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "jmphilippe"
    9. subsystem initialized to: "28. dde Package"
    10. title initialized to: "special characters not correctly sent"
    11. type initialized to: "Bug"
  2. Ticket change [c5e166bc82] (rid 121662) by jmphilippe on 2002-10-09 16:28:58:

    1. closedate changed to: "2002-10-09T09:28:58"
    2. closer changed to: "jmphilippe"
    3. icomment:
      Logged In: YES 
      user_id=134307
      
      Download the tclWinDde.c attached to bug #620541, and 
      recompile the dde package.
      
      
    4. login: "jmphilippe"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "jmphilippe"
  3. Ticket change [33372f4524] (rid 106548) by nijtmans on 2012-05-07 04:45:43:

    1. icomment:
      Having a look
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  4. Ticket change [b30363663f] (rid 98443) by nijtmans on 2012-05-07 04:45:44:

    1. assignee changed to: "nijtmans"
    2. resolution changed to: "None"
    3. status changed to: "Open"
  5. Ticket change [f77f5f3cac] (rid 91385) by dkf on 2012-05-07 13:57:25:

    1. icomment:
      It's bizarre to look at it now; the somewhat uncertain handling of Unicode by SF over the years (i.e., it changed at some point) has mangled the bug report itself...
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Ticket change [525996145c] (rid 126303) by nijtmans on 2012-05-07 14:13:12:

    1. assignee changed to: "dkf"
  7. Ticket change [4e7f0e6cf4] (rid 125648) by nijtmans on 2012-05-07 14:51:55:

    1. icomment:
      jmphilippe's proposal from #620541 committed
      to bug-473946 branch. Donal, what do you
      think about it?
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  8. Ticket change [0ae193f223] (rid 113896) by dkf on 2012-05-07 15:46:15:

    1. assignee changed to: "nijtmans"
    2. icomment:
      Seems to be on the right sort of lines (can't test; wrong platform).
      
      Key questions to my thinking: When communicating with other Tcl processes, should we transfer as Unicode, UTF-8 or [encoding system]? What about when communicating with other processes?
      
      With those sorted out, the implementation strategy should just follow.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  9. Ticket change [2b76a08b5d] (rid 118750) by sebres on 2012-05-07 16:12:01:

    1. icomment:
      I think it ' s ok.
      By CP_WINANSI it's definitely a system encoding...
      But it would be smart to use iCodePage = CP_WINUNICODE.
      http://msdn.microsoft.com/en-us/library/windows/desktop/ms648763%28v=vs.85%29.aspx
      So you can transfer all characters (ex. russian chars on german windows).
      
      
    2. login: "sebres"
    3. mimetype: "text/plain"
    4. username: "sebres"
  10. Ticket change [c5e503beb2] (rid 121665) by nijtmans on 2012-05-07 20:33:05:

    1. icomment:
      OK, I'll give a shot at a complete implementation, starting
      with jmphilippe's patch. For the actual data, the CF_TEXT
      clipboard format is used. On WIN2000 this should be
      changed to CF_UNICODETEXT. Windows can do an
      automatic conversion between those two.
      
      Yes, I consider it a bug. the CF_TEXT format assumes
      the system encoding, but Tcl is putting UTF-8 in it.
      When sending a message from Tcl to Tcl, this
      doesn't matter. But when other applications try
      to interpret this UTF-8 as sytem encoding, different
      characters arise.
      
      jmphilippe's patch only handled one way: from
      Tcl to external applications. But the reverse
      should be handled as well.
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  11. Ticket change [0dca78cae2] (rid 114423) by nijtmans on 2012-05-09 15:55:44:

    1. icomment:
      Better fix, derived from jmphilippe's now
      committed to:
         ******* branch "bug-473946"  *******
      Tested with word2007, setting
      a Tcl variable "test" to "€" and then trying to
      retreive it from word, using a field like
      {DDEAUTO TclEval test test}. Works!
      
      The advantage of using CF_UNICODETEXT
      is that it works for all chacacters. Tcl itself
      continues to use CF_TEXT for its
      communication, sending UTF-8 over it,
      so all current tests continue to function
      as normal. CF_UNICODETEXT is only
      used when an external application
      requests it. So, this is 100% upwards
      compatble.
      
      Please test/evaluate anyone interested. I
      plan to merge this to core-8-4-branch,
      core-8-5-branch and trunk in a few days.
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  12. Ticket change [dc5f8d8a35] (rid 114467) by nijtmans on 2012-05-10 02:20:59:

    1. icomment:
      Better fix, using the Tcl_GetUnicode* functions in
      stead of the Tcl_Win functions, so we no longer have
      to detect whether we are on WinNT+. It should
      now work equally on Win95 too.
      
      Version updated to "1.2.5"
      
      I think it's ready to be merged to all other branches
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  13. Ticket change [5c20ad5d86] (rid 118443) by nijtmans on 2012-05-10 05:02:02:

    1. icomment:
      > Key questions to my thinking: When communicating with other Tcl processes,
      > should we transfer as Unicode, UTF-8 or [encoding system]? What about when
      > communicating with other processes?
      OK, let's sort that out.
      
      Currently, Tcl always comminucates in dde using the CF_TEXT clipboard
      format, which is meant for [encoding system]. But Tcl sends UTF-8
      over this. That's OK, when Tcl is at both ends. Most other applications
      (e.g. Word) communicate in CF_UNICODETEXT, which assumes Unicode.
      When both dde ends use a different clipboard format, Windows
      translates it automatically, and that's where the problem arises:
      This translation assumes the [system encoding], but in reality
      it's UTF-8.
      
      Bug #473946 is solved (in the branch) by letting Tcl do
      the translation. Tcl now understands both CF_TEXT and
      CF_UNICODETEXT, and when it receives a request
      for CF_UNICODETEXT it will send the answer in
      the requested format directly. This fixes the situation
      that Tcl handles de dde server size while any other
      application handles the client side.
      
      So, what to do when Tcl is the dde client.
      communicating with another dde server?
      Then Tcl should communicate in
      CF_UNICODETEXT then. But how
      can Tcl know whether the other size
      is Tcl or not? I think that starting with
      Tcl 8.6, All dde communications should
      be in CF_UNICODETEXT, unless
      an external client (e.g. Tcl 8.5) request
      differently. Then Tcl doesn't have
      to know what's on the other side, and
      doesn't need to provide an encoding.
      If an external client requests CF_TEXT,
      then Tcl can safely assume that
      it's communication with an older Tcl
      dde server, because no-one else
      still does that ;-).
      
      This way, TIP #106 is simply
      not necessary any more....
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  14. Ticket change [9c31cb5012] (rid 111245) by nijtmans on 2012-05-11 05:15:18:

    1. closedate changed to: "2012-05-10T22:15:18"
    2. closer changed to: "nijtmans"
    3. icomment:
      
      
      allow_comments - 1
      
      Now fixed in core-8-4-branch, core-8-5-branch and trunk.
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "nijtmans"
  15. Ticket change [47579143f6] (rid 99684) by nijtmans on 2012-05-11 13:53:59:

    1. icomment:
      Just one remark. The original patch suggestion was
      from Miguel Baсуn, not from JM. Philippe.
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  16. Ticket change [9e940df9eb] (rid 96499) by nijtmans on 2012-05-11 13:54:13:

    1. icomment:
      
      
      allow_comments - 0
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  17. Ticket change [7a62625703] (rid 90307) by nijtmans on 2012-05-25 15:15:07:

    1. icomment:
      Another addition: The original committed
      fix was only for XTYP_REQUEST, but the
      same can happen for XTYP_EXECUTE
      as well.
      
      Improved fix committed to all branches
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"