eelcohn / Telegram-API

A gateway between IRC chat channels and Telegram groups, supergroups and channels
MIT License
10 stars 3 forks source link

Generic Unicode library for Tcl crash #56

Closed aRWeeX closed 5 years ago

aRWeeX commented 6 years ago

It crashes for me as soon as i source /path/to/your/scripts/Telegram-API.tcl and rehash my Eggdrop.

bad option "decode": must be format or scan
while executing
"binary decode hex [format %x $byte1][format %x $byte2][format %x $byte3][format %x $byte4]"
(procedure "::libunicode::escaped2utf8" line 37)
invoked from within
"::libunicode::escaped2utf8 $escapedstring"
("foreach" body line 2)
invoked from within
"foreach {escapedstring asciistring} [array get ::libunicode::escapedtable] {
set ::libunicode::utf8table([::libunicode::escaped2utf8 $escapedstring])..."

Someone else?

eelcohn commented 6 years ago

Hi avieks, Thanks for your feedback. What Tcl version are you using?

aRWeeX commented 6 years ago

8.6.5

eelcohn commented 5 years ago

I've finally got around to compiling Tcl8.6.5 for testing this scenario, but I cannot reproduce it. Can you open the tclsh prompt and try some commands for me?

% puts [binary decode hex 41424344]
ABCD
% puts [info patchlevel]
8.6.5
% exit
aRWeeX commented 5 years ago

I get exactly the same output. Could it be Eggdrop 1.8.3 and/or other loaded scripts? Either way, I'm going to try with a fresh Eggdrop install locally without other scripts loaded.

aRWeeX commented 5 years ago

I've solved this. I had to pass --with-tclinc= and --with-tcllib= to ./configure of Eggdrop.

Thanks for the help anyway, @eelcohn !

eelcohn commented 5 years ago

You're welcome! Glad to hear that it's fixed now.