From: <tcl...@tc...> - 2013-12-22 23:16:14
|
Repository: http://core.tcl.tk/tcl Change Notification For [tcl.h: #if TCL_UTF_MAX > 4] Ticket http://core.tcl.tk/tcl/tktview?name=418035470b1306a17cff21dbb78dedfeee3d17f4 Artifact http://core.tcl.tk/tcl/tinfo?name=5c86fb3dd144ed5f021060a39b916733f323440a On 2013-12-22T23:12:32 By pointsman Changed Fields assignee: nobody closer: nobody comment: 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 \f (See in context here: http://core.tcl.tk/tcl/artifact/f555d5aa61ea46ec31d833b33c52fb8788c8dcd f?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/197b7849d4dfcb86b50f783fdc0fc45dde12125 b?ln=100-108 foundin: 8.6.1 is_private: 0 login: pointsman priority: 5 Medium private_contact: 4ca203a8e925aecdd9419645f936bccf18cd6ea7 resolution: None severity: Minor status: Open submitter: pointsman subsystem: 44. UTF-8 Strings title: tcl.h: #if TCL_UTF_MAX > 4 type: Bug |