0

Scenario:

I have a server, on which a tmux session is running. Let’s call that session

tmux_session
in the rest of this post.

Attaching to that session can be done in two, slightly different ways:

  1. By first ssh-ing to the server:

    [email protected]ssh user@server.tld </pre></div><!-- /wp:codemirror-blocks/code-block -->  <!-- wp:paragraph -->and then attaching to the named session:<!-- /wp:paragraph -->  <!-- wp:codemirror-blocks/code-block {"showPanel":false,"languageLabel":"no","mode":"clike","mime":"text\/x-c++src"} --> 				<div class="wp-block-codemirror-blocks-code-block code-block"><pre>user@server tmux a -d -t tmux_session
    

    This works as expected. My

    LANG
    is set to
    C.UTF-8
    ,
    echo
    -ing it inside
    tmux_session
    works fine, and it’s reported correctly. Unicode input of characters like "¹²³¤", works perfectly fine.

  2. By ssh-ing and attaching at the same time:

    inside
    tmux_session
    using either method, I see this:

    echoLANG                            
    cho C.UTF-8C.UTF-8
    

    Something is garbled, for some reason the input line is (partially) repeated. I read in another post on superuser.com, that one should try by first deleting

    .tmux.conf
    . I don’t have a
    .tmux.conf
    , so not having that file doesn’t seem to alleviate the issue for me. In any event,
    $LANG
    being set to
    C.UTF-8
    is correct.

    This garbled output does not happen, when just ssh-ing to the server.