Sometimes it's all about the aesthetics.

6/29/2009

How to f*ck your CJK input in Terminal.app.

prerequisite

You being able to type CJK in the shell window under Terminal.app.
  1. Launch Terminal.app
  2. Create a bash script file, say test.bash, with this content:
    #!/bin/bash
      while true 
      do 
        tput sc
        tput cup 0 60
        echo -en `date +"%H:%M:%S %F"`
        tput rc
        sleep 1
      done
  3. Launch the script in the background:
    $ bash test.bash&
  4. Type-in some candidate CJK words without committing it into the shell buffer.
  5. Now you see your candidate buffer disappearing and showing somewhere you didn't expect.
Later I will put some screenshots to illustrate the problem.

Analysis

This happens when programs issue screen location instructions, and this causes an event that having the input methods dropping the input buffer all together. Different behaviors are observed on Mac OS X 10.4's Terminal.app, the location of the input buffer still shows up in the wrong place, but the buffer did not disappear!

No comments: