PDA

View Full Version : [ubuntu] Terminal + SHIFT_JIS + less = crashing



ralphmerridew
January 6th, 2009, 11:34 PM
Be sure to save any open work before attempting this.

1) Open two Terminal windows.
2) Set the character encoding of one of them to SHIFT_JIS.
3) On that Terminal, type
perl -e 'print "\xec\x98\x8c";' > /tmp/bug; less /tmp/bug

All Terminal windows, and any program started by a Terminal window, will now crash.

The bug only seems to appear when running less from a file; if output of the program is piped directly to less, the bug won't manifest.