Artifacts Associated With Ticket d433c0e0ad
Ticket change [2fb00348c4] (rid 176937) by chw on 2019-11-12 23:43:27:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
On Debian 9 using $ cd .../unix ; CC="cc -DTCL_UTF_MAX=4" ./configure --prefix=/tmp/mytcl --disable-static ; make $ ./tclsh % set X "\U1F602" freezes when run in a gnome-terminal. If an xterm is used instead, more chars than expected are output from the tclsh, as shown in this strace dump: write(1, "\360\302\230\302\230\302\202\r\n", 9) = 9 When rebuilding with $ cd .../unix ; CC="cc -DTCL_UTF_MAX=6" ./configure --prefix=/tmp/mytcl --disable-static ; make $ ./tclsh % set X "\U1F602" the emoji is properly displayed in gnome-terminal and strace yields the expected write(1, "\360\237\230\202\r\n", 6) = 6 Right now, this ticket is a showstopper for undroidwish/vanillawish (not for AndroidWish).
- foundin initialized to: "core-8-6-10-rc"
- is_private initialized to: "0"
- login: "chw"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0b3aff16612e1e9f3b675963fa64e01bd1d89307"
- resolution initialized to: "None"
- severity initialized to: "Cosmetic"
- status initialized to: "Open"
- submitter initialized to: "chw"
- subsystem initialized to: "44. UTF-8 Strings"
- title initialized to: "TCL_UTF_MAX == 4 problems"
- type initialized to: "Bug"
Ticket change [ce383bd55f] (rid 176938) by chw on 2019-11-13 06:42:25:
- icomment:
The core-8-7-a3-rc branch built with $ cd .../unix ; CC="cc -DTCL_UTF_MAX=4" ./configure --prefix=/tmp/mytcl --disable-static ; make $ ./tclsh % set X "\U1F602" gives some weird output in gnome-terminal and the strace dump is: write(1, "\360\313\234\313\234\342\200\232\r\n", 10)
- login: "chw"
- mimetype: "text/plain"
- icomment:
Ticket change [c9124ea821] (rid 176939) by chw on 2019-11-13 06:47:37:
- icomment:
For reference, the core-8-6-9 branch built with $ cd .../unix ; CC="cc -DTCL_UTF_MAX=4" ./configure --prefix=/tmp/mytcl --disable-static ; make $ ./tclsh % set X "\U1F602" outputs the expected emoji and the strace dump is: write(1, "\360\237\230\202\r\n", 6) = 6
- login: "chw"
- mimetype: "text/plain"
- icomment:
Ticket change [4eb5c62f06] (rid 176940) by jan.nijtmans on 2019-11-13 07:52:19:
- assignee changed to: "jan.nijtmans"
- icomment:
Thanks for the report. On core-8-6-10-rc this is definitely exported to work, so raising to "minor"
- login: "jan.nijtmans"
- mimetype: "text/plain"
- severity changed to: "Minor"
Ticket change [ae009b62bd] (rid 176950) by jan.nijtmans on 2019-11-13 09:10:00:
- icomment:
This should be fixed in [b5633ba3bd8fa74e]. Can you confirm that this fixes this? Thanks!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Pending"
- icomment:
Ticket change [3ed9242a56] (rid 176951) by jan.nijtmans on 2019-11-13 09:21:36:
- icomment:
Did you bisect? If you did, I guess that commit [9e1984c250d1a859] introduced this bug. This commit made it possible that TclUtfToUniChar() is called when it points to the 2nd character of a valid 4-byte UTF-8 character. The macro didn't account for that. Thanks!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [ca92f08d4b] (rid 176954) by chw on 2019-11-13 09:51:51:
- icomment:
Again on Debian 9, core-8-6-branch [b5633ba3bd] using $ cd .../unix ; CC="cc -DTCL_UTF_MAX=4" ./configure --prefix=/tmp/mytcl --disable-static ; make $ ./tclsh % set X "\U1F602" the gnome-terminal hangs and the strace dump is write(1, "\360\302\230\302\230\302\202\r\n", 9) Using surrogate pair notation outputs the expected emoji % set X "\uD83D\uDE02" and strace dump is write(1, "\360\237\230\202\r\n", 6) = 6 Now let's do the opposite direction % set X "\uD83D\uDE02" % set F [open OUT w] % puts -nonewline $F $X % close $F % set F [open OUT] % set Y [read $F] ; close $F % set Y the gnome-terminal hangs again and the strace dump is write(1, "\303\260\302\230\302\230\302\202\r\n", 10)
- login: "chw"
- mimetype: "text/plain"
- icomment:
Ticket change [9c486b5da7] (rid 176959) by jan.nijtmans on 2019-11-13 12:39:01:
- icomment:
Please, try again with [e377ac273f]. I think I really got it now ...
- login: "jan.nijtmans"
- mimetype: "text/plain"
- icomment:
Ticket change [a0a66773a3] (rid 176962) by chw on 2019-11-13 14:07:20:
- icomment:
Bingo! The exact same sequence I've run against [b5633ba3bd] now works both with "\U1F602" and "\uD83D\uDE02" notation. I think you can close the ticket now, thanks for fixing.
- login: "chw"
- mimetype: "text/plain"
- icomment:
Ticket change [04c41202c6] (rid 176963) by jan.nijtmans on 2019-11-13 14:25:53:
- closedate changed to: "2458801.1013138"
- closer changed to: "jan.nijtmans"
- icomment:
Thanks for confirming the fix! .. And for the bug report to start with ... !!!!
- login: "jan.nijtmans"
- mimetype: "text/plain"
- status changed to: "Closed"