Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I've got a directory listing with files like:

drwxr-xr-x   2 nobody nogroup       4096 2011-01-11 21:06 Капкан
drwxr-xr-x   3 nobody nogroup       4096 2011-11-17 08:40 СБПЧ

When I copy/paste or directly input such filenames into the prompt, I expect to be able to work with them just like Latin-1 letters.

Instead, I get results like:

# Pasting "Капкан"
$ :?апкан 

You see the first letter is replaced by ":?". Then, I am not able to traverse the characters to the left except by deleting them. Keyboard-based input produces the same results. tmux or screen yank/paste produces the same results.

I'm not sure how to diagnose this situation! This is a pretty old Debian distro ($ uname -a Linux weezy #1 Thu Jul 26 04:49:29 PDT 2012 i686 GNU/Linux), but still I'd think that there's a way to get UTF-8 filenames behaving as I'd expect.

I am using OS X's and TERM is set to xterm-color.

I do believe these filenames are encoded using UTF-8. I am using Bash 3.1.17, and here is my output from locale:

$ locale

Here's my output from $ locale -a:


I would consider installing ru_RU.UTF-8 from /etc/locale.gen but I'm having trouble with basic Latin characters too, like á.

share|improve this question
That's what you get if you copy the letters from the terminal and try to paste them back? What terminal is this? – Etan Reisner Aug 19 '13 at 16:58
This also happens with direct input, not just pasting. I am using OS X's, and I've got TERM set to xterm-color. – dimadima Aug 19 '13 at 17:00
If this was xterm itself I'd suggest checking the various input settings for utf-8/eight-bit-input but I don't know if has those (I'd sort of hope not). Can you paste these characters into other applications correctly when copied from the terminal? – Etan Reisner Aug 19 '13 at 17:09
Yep, pasting out works fine: that's how I got those characters into this post. The problem, anyway, is both with direct input and copy/paste, both OS copy/paste and tmux vi-mode yank/paste. Amusingly, when I mount that path locally via SSHFS, I'm able to use my local Bash as expected: Input+autocomplete, AND copy/paste. – dimadima Aug 19 '13 at 17:11
Do you have the Escape non-ASCII characters setting in enabled or disabled? If it is enabled does disabling it help? – Etan Reisner Aug 19 '13 at 17:16
up vote 1 down vote accepted

As per comments above twiddling the Escape non-ASCII characters setting appears to have solved the problem. Though I am left confused at to the direction in which the twiddling was necessary to make this work correctly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.