Found crash on Chinese unicode“大东宝马”,a

78 views
Skip to first unread message

clt.to...@dfgh.net

unread,
Sep 13, 2022, 11:11:12 AMSep 13
to
>From: fei jay <fei...@gmail.com>
>Date: Tue Sep 13 12:00:41 GMT 2022
>Subject: =?UTF-8?B?Rm91bmQgY3Jhc2ggb24gQ2hpbmVzZSB1bmljb2Rl4oCc5aSn5Lic5a6d6ams4oCd77yMYQ==?=


>#0 0x00007fb7c2f7d418 in Tcl_UtfToUniChar () from libtcl8.6.so
>#1 0x00007fb7c2f7ee1f in TclUtfToUCS4 () from libtcl8.6.so
>#2 0x00007fb7c2f7f244 in Tcl_UtfToLower () from libtcl8.6.so
>#3 0x00007fb7c2f1ebba in ?? () from libtcl8.6.so
>#4 0x00007fb7c2e84aa6 in TclNRRunCallbacks () from libtcl8.6.so
>#5 0x00007fb7c2e86273 in TclEvalEx () from libtcl8.6.so
>#6 0x00007fb7c2e868b3 in Tcl_EvalEx () from libtcl8.6.so
>#7 0x00007fb7c2e868f5 in Tcl_Eval () from libtcl8.6.so



I'm using tcl 8.6.12

in tclsh:
set s \U5927\U4E1C\U5B9D\U9A6C
shows 4 generic characters

however in tkcon it displays properly
大东宝马

I'm not getting any errors.

Dave B


fei jay

unread,
Sep 13, 2022, 9:32:56 PMSep 13
to
hi,Dave B
Can tclsh call the same callstack?how to do it?The crash I test, without "大东宝马" is ok

Christian Gollwitzer

unread,
Sep 14, 2022, 1:38:54 AMSep 14
to
Am 14.09.22 um 03:32 schrieb fei jay:
You haven't shared your code, that crashed. It is therefore impossible
for anyone to reproduce the problem.

Create a short example code that crashes for you and show it here.

Christian

fei jay

unread,
Sep 14, 2022, 5:57:39 AMSep 14
to
I found 8.6.12 this commit missing and we apply this to 8.6.12,the crash fixed
“大东宝马‘’ ´ó¶«±¦Âí] ´ó¶«±¦Âí has char in CP-1252

invalid UTF-8 characters
https://github.com/tcltk/tcl/commit/3af16acbcb63ea2935d71b905371252560dc4659

SHA-1: 3af16acbcb63ea2935d71b905371252560dc4659

* Treat invalid UTF-8 characters in the range 0x80-0x9F as cp1252: See [https://en.wikipedia.org/wiki/UTF-8]. To be added to TIP #389

Alan Grunwald

unread,
Sep 14, 2022, 7:22:12 AMSep 14
to
Same here, using tcl 8.6.9 on Linux - except that I get proper display
with tclsh too.

Ricardo kozmate.net

unread,
Sep 18, 2022, 10:44:57 AMSep 18
to
Em 14/09/22 12:21, Alan Grunwald escreveu:
>> I'm using tcl 8.6.12
>>
>> in tclsh:
>> set s \U5927\U4E1C\U5B9D\U9A6C
>> shows 4 generic characters
>>
>> however in tkcon it displays properly
>> 大东宝马
>>
>> I'm not getting any errors.
>>
>> Dave B
>>
>>
> Same here, using tcl 8.6.9 on Linux - except that I get proper display
> with tclsh too.

Using 8.6.12 I get the same characters on tclsh. I presume it depends on
the fonts available at the shell, not on TCL itself.

--
{ricardo from kozmate.net}
Reply all
Reply to author
Forward
0 new messages