Skip to content
Tcl Source Code History Of Ticket 418035470b1306a1
Login

History Of Ticket 418035470b1306a1

Artifacts Associated With Ticket 418035470b1306a1

  1. Ticket change [5c86fb3dd1] (rid 136132) by pointsman on 2013-12-22 23:12:32:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      tcl.h has:
      
      #if TCL_UTF_MAX > 4
          /*
           * unsigned int isn't 100% accurate as it should be a strict 4-byte value
           * (perhaps wchar_t). 64-bit systems may have troubles. The size of this
           * value must be reflected correctly in regcustom.h and
           * in tclEncoding.c.
           * XXX: Tcl is currently UCS-2 and planning UTF-16 for the Unicode
           * XXX: string rep that Tcl_UniChar represents.  Changing the size
           * XXX: of Tcl_UniChar is /not/ supported.
           */
      typedef unsigned int Tcl_UniChar;
      #else
      typedef unsigned short Tcl_UniChar;
      #endif
      
      (See in context here: http://core.tcl.tk/tcl/artifact/f555d5aa61ea46ec31d833b33c52fb8788c8dcdf?ln=2208-2221)
      
      That means, with TCL_UTF_MAX 4 Tcl_UniChar is still an unsigned short. This is obviously wrong, because a valid 4 byte utf-8 char is beyond the BMP, that means bigger than an unsigned short.
      
      That define should read as 
      
      #if TCL_UTF_MAX > 3
      
      as before check-in http://core.tcl.tk/tcl/info/4d6af4f7a468b71a
      
      Same in regcustom.h: http://core.tcl.tk/tcl/artifact/197b7849d4dfcb86b50f783fdc0fc45dde12125b?ln=100-108
      
    5. foundin initialized to: "8.6.1"
    6. is_private initialized to: "0"
    7. login: "pointsman"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "4ca203a8e925aecdd9419645f936bccf18cd6ea7"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "pointsman"
    14. subsystem initialized to: "44. UTF-8 Strings"
    15. title initialized to: "tcl.h: #if TCL_UTF_MAX > 4"
    16. type initialized to: "Bug"
  2. Ticket change [fc4337aa97] (rid 136133) by jan.nijtmans on 2013-12-23 10:13:38:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2456649.92613796"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      > because a valid 4 byte utf-8 char is beyond the BMP,
      > that means bigger than an unsigned short.
      
      Unless surrogate pairs are used to represent characters beyond the BMP.
      
      In TIP #388 you can read the reason for this:
      > 4 Not supported. The same as 3, but allowing the use of
      > Unicode surrogate pairs to represent the range \U010000 - \U10ffff
      
      Implementation of this is ongoing in the "tip-389-impl" Tcl branch.
      
      Hope this helps.
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/plain"
    7. resolution changed to: "Rejected"
    8. status changed to: "Closed"