Tmux Powerline Special Characters Issue

tmux is a terminal multiplexer like screen on steroids. It is faster, slicker and much more easily extendable than screen. For why you might want to try tmux over screen checkout

Tmux Powerline is an extension to tmux’s statusline which makes it look incredibly cool. Look at this screenshot.

Screenshot from 2013-02-23 12:21:31

There are 2 projects that provide this feature.

The second one by Lokaltog, originally was a plugin for vim that inspired tmux-powerline, today it is the right choice and has bindings for most shells, vim and even tmux, so it can be used as a single solution for all. The installation instructions are simple.

However when I initially installed it, I was facing a weird issue, something that I didn’t find much information on. No one seemed to have faced a similar issue or reported any relavant fixes. See the screenshot below to get an idea about the issue. Notice how the status line is crooked.Screenshot from 2013-02-22 18:51:51

After a lot of digging around I was able to deduce that the issue was because tmux wasn’t supporting utf-8 characters. After a lot of attempts I found a temporary fix by simply using ‘tmux -u‘ which forces tmux to use utf8 instead of trying to figure out utf-8 support from the system locale. And it magically fixed the issue!

From that then I went and manually edited the ‘/etc/defaults/locale‘ and switched my LANG=en_IN to LANG=en_IN.UTF-8. You can use the command ‘locale -a’ to figure out what locale is supported by your system and use one that you think is appropriate, but ensure you use the UTF-8 one. After this change I had to restart my system and the problem was fixed permanently. Hope it helps others who may be facing similar issues.

12 thoughts on “Tmux Powerline Special Characters Issue

  1. Morgan

    Nice setup. Trying to replicate it I’m having trouble getting the fonts to look good with the arrows in the powerline (even after patching). What font do you use in your screenshots above?

      1. Morgan

        That’s lovely, thank you. I’ve got powerline working perfectly in vim now. However, I can’t seem to get the one for tmux to work. Did you do anything more than adding ” source ‘{path to powerline}/bindings/tmux/powerline.conf’ ” in .tmux.conf as the installation instructions specifies?

        1. dhruvasagar Post author

          Which version of powerline are you using ? There are 2 available, there is the old ‘’ and the new ‘’, i’d recommend to use the latter.

        2. Morgan

          I’m using the new one, which was installed via the pip command listed on the installation instructions. The files are located in ~/Library/Python/2.7/lib/python/site-packages/powerline/

          But, I got it working. Your comment about the powerline and powerline-lint commands made me realize I didn’t have them. After adding ~/Library/Python/2.7/bin to my $PATH, everything seems to be working.

          Thanks 🙂

  2. dhruvasagar Post author

    Where is your powerline project available ? Make sure the path is correct.
    There’s a ‘powerline’ folder inside of the ‘powerline’ directory which has has the bindings folder.

    it should look something like this : ~/.powerline/powerline/bindings/tmux/powerline.conf

    Also, if you have made any changes to powerline.conf, you should check it by using this command :
    ‘powerline-lint -p ~/path/to/powerline/config_files’

    You can also test in the terminal what the ‘powerline’ command is outputing for tmux using :
    ‘powerline tmux left|right’ if there is any error you’d be able to pick it up from there.

  3. Bart

    Thanks! Couldn’t find why on one of my vm’s my vim/powerline config was acting strange – indeed was the UTF-8 locale setting (it was “en_US”, had to be”en_US.utf8″)

  4. collins

    I have a trouble with this powerline.
    Do you know how to fix this issue.
    After I install. I start tmux but each time I start it, it raise a bunch of set option to screen like below. I must have to press “q” then this bunch option out.

    set option: status-fg -> colour231
    set option: status-bg -> colour234
    set option: window-status-fg -> colour249
    set option: window-status-activity-attr -> none
    set option: window-status-bell-attr -> none
    set option: window-status-activity-fg -> yellow
    set option: window-status-bell-fg -> red
    set option: status-left -> “#{?client_prefix,#[fg=colour254]#[bg=colour31]#[bold],#[fg=colour16]#[bg=colour254]#[bold]} #S #{?client_prefix,#[fg=colour31]#[bg=colour234]#[nob”
    set option: window-status-last-fg -> colour31

    I don’t know why. I have research many post but noone has the same problem as mine.

    1. dhruvasagar Post author

      Well I can’t really tell but it’s surely something wrong in your tmux configuration.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.