Solved. Summary: I started tmux in my ~/.profile before setting LANG and LC_ALL. Changing to starting tmux from $ENV, after setting & exporting LANG and LC_ALL solved the display issue with accented characters.
This, however made the panel layout go really wonky (bad line-drawing characters). I use iTerm on a Mac to connect to my OpenBSD machine, and in iTerm there's a "Treat ambigous-width characters as double width" setting. Unsetting this solves the panel layout problem. Thanks to Nick for pointing me in the right directions. I don't know if any of this helps Jan (the original poster) though... Cheers, Andreas On Sun, May 01, 2016 at 09:08:04PM +0200, Andreas Kusalananda K�h�ri wrote: > On Sun, May 01, 2016 at 07:32:09PM +0100, Nicholas Marriott wrote: > > Underscores means tmux does not know that your terminal supports UTF-8 > > which probably means LANG or LC_ALL are not exported correctly. > > LANG and LC_ALL are exportded with value "en_US.UTF-8". Exporting the > other LC_* variables doesn't make any differece. Setting TERM to > screen, screen-256color or rxvt (or anything else) doesn't seem to make > any differece either. > > > > On 1 May 2016 7:24 p.m., "Andreas Kusalananda K??h??ri" < > > andreas.kah...@icm.uu.se> wrote: > > > > > On Sun, May 01, 2016 at 07:10:03PM +0200, Ingo Schwarze wrote: > > > > Hi Jan, > > > > > > > > hans wrote on Sat, Apr 30, 2016 at 01:08:12PM +0200: > > > > > > > > > In the last snapshot, it seems, tmux does not do UTF8 input > correctly, > > > > > while xterm is fine. This used to work with the ~/.xsession below. > > > > > > > > > > When typing non-ascii in xterm or in a vim-in-an-xterm > > > > > ot a mutt-in-an-xterm, thay appear OK. When in a tmux window, > > > > > they look like garbage. > > > > > > > > > > Interestingly, if I type some Czech text into /tmp/cz > > > > > (using vim in an xterm, whre it works), and then open > > > > > the file with vim in tmux, the text there appears fine > > > > > - only _new_ text typed within tmux looks broken. > > > > > > > > > > Has anything changed in the way tmux handles UTF8? > > > > > > > > Such generic questions are always hard to answer. > > > > Yes, some things changed recently, but who knows whether > > > > that is related? > > > > > > I'm also having problems with accented characters in tmux, but in my > > > case, I get underscores when I try to enter Swedish characters (??????, > > > hope that comes out right) or any accented characters, so I'm not > > > sure it's the same issue as Jan had. It's been like this for quite > > > some time (months, possibly since all the non-UTF/POSIX locales were > > > removed). It's not just characters that I type, but mutt-in-tmux shows > > > all accented characters in email as underscores too, as does less > > > and cat. Typing accented characters will actually insert the right > > > character into the document (although in vim-in-tmux, again, it's all > > > underscores), it's just the displaying of them that is wonky. > > > > > > I'm using tmux without X, over an SSH connection. > > > > > > $ locale > > > LANG=en_US.UTF-8 > > > LC_COLLATE="C" > > > LC_CTYPE="en_US.UTF-8" > > > LC_MONETARY="C" > > > LC_NUMERIC="C" > > > LC_TIME="C" > > > LC_MESSAGES="en_US.UTF-8" > > > LC_ALL=en_US.UTF-8 > > > > > > (using sv_SE.UTF-8 doesn't make any differece) > > > > > > Outside of tmux, it seems to work ok. This is on amd64, recompiled from > > > a checkout yesterday evening, running in an VM on VirtualBox. > > > > > > Cheers, > > > Andreas [cut]