xterm wrongly handles Unicode on the prompt when printing text

Bug #526893 reported by Dominik George on 2010-02-24
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Low
Ubuntu Desktop Bugs
kdebase (Ubuntu)
Undecided
Unassigned
xterm (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: xterm

xterm misinterpretes some characters and writes junk text to the terminal under the followign conditions:

1. The prompt contains special charachters, in this test case german umlauts
2. The text printed from a command (shell built-in, program, script, etc.) does not end with a line break

Steps to reproduce:

Start xterm or any terminal emulator relying on it (e.g. gnome-terminal), then create or cd into a directory containing an umlaut (e.g. Ü11). Run a command that generates a one-line output of text, e.g. "echo -n Hello".

Expecgted behaviour: The output text is printed in front of the next line's command line prompt with the input mark behind the prompt

Current behaviour: Text is not printed, instead, parts of the prompt are printed behind it and after the input mark

ProblemType: Bug
Architecture: amd64
Date: Wed Feb 24 09:18:34 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MachineType: Dell Inc. Latitude E5500
Package: xterm 243-1ubuntu1
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.31-19-generic root=UUID=d2ab955b-802d-4e3e-8b90-3453e5af04f4 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
RelatedPackageVersions:
 xserver-xorg 1:7.4+3ubuntu10
 libgl1-mesa-glx 7.6.0-1ubuntu4
 libdrm2 2.4.14-1ubuntu1
 xserver-xorg-video-intel 2:2.9.0-1ubuntu2.1
 xserver-xorg-video-ati 1:6.12.99+git20090929.7968e1fb-0ubuntu1
SourcePackage: xterm
Uname: Linux 2.6.31-19-generic x86_64
XorgConf: Error: [Errno 2] No such file or directory: '/etc/X11/xorg.conf'
XsessionErrors:
 (gnome-settings-daemon:2300): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:2300): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:2404): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:2429): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (thunderbird-bin:2948): GLib-WARNING **: g_set_prgname() called multiple times
dmi.bios.date: 08/11/2009
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A13
dmi.board.name: 0DW634
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA13:bd08/11/2009:svnDellInc.:pnLatitudeE5500:pvr:rvnDellInc.:rn0DW634:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude E5500
dmi.sys.vendor: Dell Inc.
fglrx: Not loaded
system:
 distro: Ubuntu
 architecture: x86_64kernel: 2.6.31-19-generic

Dominik George (natureshadow) wrote :

On Wed, 24 Feb 2010, Dominik George wrote:

> Public bug reported:
>
> Binary package hint: xterm
>
> xterm misinterpretes some characters and writes junk text to the
> terminal under the followign conditions:
>
> 1. The prompt contains special charachters, in this test case german umlauts
> 2. The text printed from a command (shell built-in, program, script, etc.) does not end with a line break

Sounds like a problem with one of (a) the user's configuration, or (b) the
shell. Not a bug in xterm.

>
> Steps to reproduce:
>
> Start xterm or any terminal emulator relying on it (e.g. gnome-
> terminal), then create or cd into a directory containing an umlaut (e.g.

indeed "any terminal emulator"

> LANG=de_DE.UTF-8
> SHELL=/bin/zsh

Is this the actual shell? If so, it should be reassigned to that package.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Dominik George (natureshadow) wrote :

zsh is the login shell, but this is about Bash (running from zsh or "native" does not matter). The bug is reproducible across multiple hosts, users, environments.

It is not related to the shell itself. The bug can be reproduced in Bash, Dash and Csh.

The bug does not show when running in a tty, so it *is* X-related.

Dominik George (natureshadow) wrote :

On Wed, 24 Feb 2010, Dominik George wrote:

> zsh is the login shell, but this is about Bash (running from zsh or
> "native" does not matter). The bug is reproducible across multiple
> hosts, users, environments.
>
> It is not related to the shell itself. The bug can be reproduced in
> Bash, Dash and Csh.

bash (but not dash or csh as far as I recall) contains code which is
supposed to count the length of the prompt, for positioning the cursor.

The code in bash has been the subject of occasional bug reports for
some time.

> The bug does not show when running in a tty, so it *is* X-related.
>
> ** Also affects: gnome-terminal (Ubuntu)
> Importance: Undecided
> Status: New

gnome-terminal, konsole and xterm all are independent - it's likely that
there is a common cause for this issue which is unrelated to any of these.

You may get some insight on the problem by using "script" to capture the
output of the shell (to see which characters are sent to the terminal).

That may be different between the Linux console and the X applications.

>
> ** Also affects: kdebase (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> xterm wrongly handles Unicode on the prompt when printing text
> https://bugs.launchpad.net/bugs/526893
> You received this bug notification because you are subscribed to xterm
> in ubuntu.
>

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Jonathan Thomas (echidnaman) wrote :

Hi there!

Thanks for reporting this bug! Your bug seems to be a problem with the KDE program itself, and not with our KDE packages. While we appreciate your issue, it would be better if it was tracked at https://bugs.kde.org, so that the KDE developers can deal with this speedily and have direct communication with you as the reporter for more effective debugging.

Thanks!

Changed in kdebase (Ubuntu):
status: New → Invalid
Chris Coulson (chrisccoulson) wrote :

Not recreating the issue here, it works normally. Do you only get this from terminal emulators, or by logging in to a console too?

Changed in gnome-terminal (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Incomplete
Dominik George (natureshadow) wrote :

Compare comment no. 3. Only in terminal emulators.

Bryce Harrington (bryce) on 2010-03-18
tags: added: karmic
bugbot (bugbot) wrote :

This bug report was filed against an old version of Ubuntu.
Can you confirm whether this is still an issue in natty?

If you don't mind, it would be very helpful if you could update the bug
report in launchpad to 'Fix Released' if it is no longer an issue for
you, or if it is still occurring under natty, please tag the bug 'natty'
so it's easier for us to track.

Changed in xterm (Ubuntu):
status: New → Incomplete
Dominik George (natureshadow) wrote :

Sorry, I cannot reproduce it in natty because natty won't ever make its way onto my harddrive.

Bryce Harrington (bryce) wrote :

Since the hardware is no longer available for doing troubleshooting with, we'll have to close the bug for now. However please feel free to reopen if you or anyone else has the same HW and can reproduce this issue using the latest development version of Ubuntu and is willing to do some troubleshooting with it.

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

Duplicates of this bug

Other bug subscribers