Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In tmux's copy mode, I cannot search for a Unicode (non-ASCII) string, tmux just doesn't show (and just ignore) non-ASCII characters in the "Search Up:" prompt!

In ~/.tmux.conf, I have:

setw -g utf8 on
set -g status-utf8 on
set -g mouse-utf8 on

And I use

tmux -u

to start tmux (version 1.6) in xterm. (I've also tried this in urxvt and got same result.)

Any suggestions? Is searching with Unicode string supported? Thanks.

share|improve this question

Unfortunately, it looks like only non-control ASCII is currently accepted.

See the MODEKEY_OTHER handling in window_copy_key_input() of window-copy.c.

The underlying comparison code (window_copy_search_compare()) looks like it handles UTF-8 mode, so you might be able to get some basic functionality by simply allowing bytes greater than 127 to be added to the buffer. There are (at least!) some small problems if you do this though:

  • Backspace still deletes one byte at a time. This can leave partial UTF-8 sequences in the buffer which seem to confuse the UTF-8 comparator (the resulting buffer matches everywhere!).
  • Combining characters are not handled specially.
    As an example, the codepoint sequences U+00E9 and U+0065 U+0301 both look the same, but will compare as different (though each does compare as equal to itself).

You might want to ask on the tmux-users mailing list for better-founded advice.

There could also be large problems (e.g. crashing and killing all your sessions); I do not know the code well enough to guess.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .