#39 Tcl/Expect hangs sending multibyte Japanese or Korean char

open-remind
None
6
2007-05-04
2007-04-12
No

Expect 5.39.0
Tcl 8.4.5 (with fixes for 462317 and 923474)
Solaris 10 Japanese and Korean UTF-8 fonts

Problem: Expect is used extensively to send commands to another csh. Commands vary in length and some contain Japanese UTF-8 characters. Our sends hang after repeated execution (~150). It appears that send thinks there is more data and is waiting. The command is never executed.

There seems to be an interplay between the command length (send length) and the behavior. The Korean file contains 5090 characters and may or may not be fully processed depending on the overall command length ( send "$cmd\r" ). Restarting the shell seems to help clean up the problem but does not fix it.

I'm attaching a tar file containing Japanese and Korean UTF-8 language file and some code that produces the hang on my system.

I run the desktop in UTF-8.

41: locale
LANG=
LC_CTYPE=ja_JP.UTF-8
LC_NUMERIC=ja_JP.UTF-8
LC_TIME=ja_JP.UTF-8
LC_COLLATE=ja_JP.UTF-8
LC_MONETARY=ja_JP.UTF-8
LC_MESSAGES=ja_JP.UTF-8
LC_ALL=

Discussion

  • test program and language files

     
    Attachments
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2007-04-13

    • status: open --> pending-out-of-date
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2007-04-13

    Logged In: YES
    user_id=72656
    Originator: NO

    This bug is considered out of date unless reproduced with the latest versions of the core and Expect. You can try ActiveTcl 8.4.14 to make it easier.

     
    • status: pending-out-of-date --> open-out-of-date
     
  • Logged In: YES
    user_id=1030524
    Originator: YES

    I built Tcl 8.4.14 with Expect 5.43.0 this morning and have reproduced the problem. I tried this when we first saw the problem hoping it would fix the problem but it did not. Please have a look at this and let me know if you need any more information.

    Thanks,
    Mike

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2007-04-13

    • priority: 5 --> 6
    • assigned_to: nobody --> andreas_kupries
     
    • status: open-out-of-date --> open-remind
     
  • Logged In: YES
    user_id=1030524
    Originator: YES

    Please have a look at this. I have re-tested as asked and there is still a problem.

    Mike