Tmux borders displayed as x q instead of lines?

Utf 8DebianTmux

Utf 8 Problem Overview


I'm having trouble getting tmux to display lines for borders. They are being created with x and q. It's a debian squeeze server and the locale is set to en_US UTF8. I also tried adding

# instructs tmux to expect UTF-8 sequences
setw -g utf8 on
set -g status-utf8 on

lines to .tmux.conf. Nothing seems to work. I'm not sure if it's a locale issue or not. It displays correctly on other servers, but not the debian. I appreciate any tips you could offer! Thanks...

Utf 8 Solutions


Solution 1 - Utf 8

I had the same problem with PuTTY and Windows 8 when connecting to tmux running on a Debian Squeeze machine. Even when setting the charset to UTF-8 in PuTTY (in the settings under Window > Translation > Remote character set) I didn't get the correct line drawing.

Setting the Remote character set to "Use font encoding" did the trick for me.

Solution 2 - Utf 8

There is some mismatch between your terminal emulator and the terminfo database entry being used by tmux (the one named by the TERM environment variable when you start/attach to a tmux server).


Per the VT100 User Guide, Table 3-9: Special Graphics Characters, when the “special graphics set” is selected, x is used to draw the “Vertical bar” and q is used to draw “Horizontal line - Scan 5”.

Under terminfo, the VT100 special graphics characters are available as a part of the Alternate Character Set functionality; see the “Line Graphics” section of the terminfo(5) man page.


Probably (on your Debian server) the effective terminfo database entry indicates that ACS is available, but your terminal emulator is not actually responding to the specified control sequences.

The tmux CHANGES file indicates that some terminal emulators (e.g. Putty) do not respect the ACS control sequences when they are in UTF-8 mode. Thus, tmux 1.4 has a change that makes it always use UTF-8 characters instead of ACS sequences when the attaching client specifies that it can handle UTF-8 (i.e. when attaching, -u was given or UTF-8 is present in LC_ALL, LC_CTYPE or LANG; the utf8 window option is about what tmux should expect from the programs it runs, not what it can send to the attached client).

Debian “squeeze” only includes tmux 1.3, so your tmux probably does not have the “prefer UTF-8 line drawing” feature (unless it pulls from a backports source).

If you can not fix your terminal emulator nor upgrade to at least tmux 1.4, then you might be able to use tmux’s terminal-overrides option to unset the ACS-related capabilities so that tmux will fall back to ASCII line drawing. In your .tmux.conf (on the Debian system):

set-option -ga terminal-overrides ',*:enacs@:smacs@:rmacs@:acsc@'

Solution 3 - Utf 8

Try setting the character set to "UTF-8" and "Use Unicode line drawing code points" under Window -> Translation in your putty settings.

Solution 4 - Utf 8

I had the same problem with Putty when launching tmux on Linux 12.04 machine. Even setting the charset to UTF-8 in PuTTY (in the settings under Window > Translation > Remote character set) didn't solve the problem.

Launching tmux with -u option did the trick (tmux -u)

Solution 5 - Utf 8

If you have Putty 0.73 or higher open settings, expand Window category, then select Translation. Check 'Enable VT100 line drawing even in UTF-8 mode':

PuTTY Translation Settings

Solution 6 - Utf 8

I ran thru the gamut of suggestions including:

  • confirming locale and UTF-8 setting in PuTTY
  • exporting NCURSES_NO_UT8_ACS=1
  • manually trying various fonts and PuTTY translation selections

Above did not work. Dialog displays showed qqqq... and xxxx with various corner characters.

Changing all dialog calls to include --ascii-lines was an option but it would involve a lot of script changes.

Best recommendation was to change the Remote Character Set to Use font encoding.

PuTTY Change Settings --> Window --> Translation --> Remote Character Set --> Use font encoding

Left all other PuTTY settings default.

Solution 7 - Utf 8

I changed the setting in Putty for terminal to Latin-1 and that seemed to fix the problem.

Solution 8 - Utf 8

If you are using KiTTY there is a check box under Windows -> Translation tab, that is called "Allow ACS line drawing in UTF". It needs to be checked:

enter image description here

Solution 9 - Utf 8

For me the issue was I forgot to make a locale.conf file when I setup this Arch Linux box. Below line fixed the issue, substitute your own language. A reboot was not required for me.

echo "LANG=en_US.UTF-8" > /etc/locale.conf 

Solution 10 - Utf 8

under windows/ putty the font you use has to have the characters for it to display set translation "UTF-8" and "Use Unicode line drawing code points" and font to "courier-new" and most of those problems go away

Solution 11 - Utf 8

It seems the font choice is a confusing factor here, to wit:

  • Lucida sans doesn't display UTF-8 line drawing, only - + | (pipe) substitution
  • Courier New Bold does horizontal lines but | substitution for vertical
  • Courier New Normal does 'em all.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmaplebonsaiView Question on Stackoverflow
Solution 1 - Utf 8rkallenseeView Answer on Stackoverflow
Solution 2 - Utf 8Chris JohnsenView Answer on Stackoverflow
Solution 3 - Utf 8javamonkView Answer on Stackoverflow
Solution 4 - Utf 8renadeenView Answer on Stackoverflow
Solution 5 - Utf 8Pavel ChuchuvaView Answer on Stackoverflow
Solution 6 - Utf 8E. WaldnerView Answer on Stackoverflow
Solution 7 - Utf 8Kurt PetersView Answer on Stackoverflow
Solution 8 - Utf 8Andrew SavinykhView Answer on Stackoverflow
Solution 9 - Utf 8LantoraxView Answer on Stackoverflow
Solution 10 - Utf 8user250177View Answer on Stackoverflow
Solution 11 - Utf 8NoMannView Answer on Stackoverflow