Ubuntu

Input/output encoding messed up when using invalid LC_TIME (via ssh)

Reported by Daniel Hahler on 2011-09-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu (Ubuntu)
Low
Unassigned

Bug Description

When using ssh to connect from a Lucid box to an Oneiric machine and then starting byobu I've noticed that sending/receiving of utf8 input is messed up. Typing multiple "ä" characters (on a german keyboard) produces: "ä � � � � � �"

I am using the "en_US.UTF-8" locale in general, but have changed LC_TIME recently.

However, de_DE.UTF-8 is not installed on the Oneiric machine (where I run byobu after ssh'ing into).

WORKAROUND: unsetting LC_TIME before starting byobu.

I could imagine that it is related to byobu's displaying of the current time, where a wrong LC_TIME setting might interfere.

This is with byobu 4.32-0ubuntu1 (I am just upgrading), but wanted to file this bug report already.

% locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Dustin Kirkland  (kirkland) wrote :

Hmm, I just tried to set LC_TIME invalid, and I get:

$ export LC_TIME=asdf
bash: warning: setlocale: LC_TIME: cannot change locale (asdf): No such file or directory

So I'm having trouble reproducing this right now...

Dustin Kirkland  (kirkland) wrote :

I also tried the following:

LC_TIME=asdf ssh -t localhost byobu bash

and then:

kirkland@x201:~$ echo $LC_TIME
asdf
kirkland@x201:~$ echo "ä"

Changed in byobu (Ubuntu):
importance: Undecided → Low
Dustin Kirkland  (kirkland) wrote :

  status incomplete

Changed in byobu (Ubuntu):
status: New → Incomplete
Daniel Hahler (blueyed) wrote :

Try ssh'ing after "export LC_TIME=asdf".
While bash apparently barks, it still sets it and I can reproduce it like this, too:
% export LC_TIME=asdf
% ssh oneiric-vm.local
% byobu
Typing "ä" three times results in:
% ä � �

I've noticed that starting bash then in byobu (from the zsh which I use by default), behaves different as in that "ä" results in "ä " always.

Your "echo ä" testcase appears to be good enough though already, since that should result in "ä" being echoed of course.
Does it fail for you from outside of byobu? (for me, it works, until I start byobu)

Changed in byobu (Ubuntu):
status: Incomplete → New
Dustin Kirkland  (kirkland) wrote :

Hmm, well, I can confirm it now. Not sure what's wrong though. It is specific to byobu+screen. I was not able to reproduce it in byobu+tmux, nor in screen without byobu.

Changed in byobu (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers