Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95259 - app-shells/bash ignores echo escape sequences w/ UTF-8 enabled console
Summary: app-shells/bash ignores echo escape sequences w/ UTF-8 enabled console
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 166352 199611 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-06 13:35 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2010-10-10 03:36 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DEMAINE Benoît-Pierre, aka DoubleHP 2005-06-06 13:35:34 UTC
logs of emerge are: 

>>> original instance of package unmerged safely.
 * hddtemp has to be suid root to allow regular users to run this plugin.
 * To make it suid root, run
 *
 * \tchmod u+s /usr/sbin/hddtemp
>>> Regenerating /etc/ld.so.cache...

when I expect the \t to become a 8 spaces tabulation ...
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-06-06 13:38:30 UTC
Well, sorry - this is not a typo, this is a (portage?) bug related to UTF-8
enabled console. 
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-06-06 13:44:06 UTC
Another example:

* screen is not installed as setuid root, which effectively disables multi-user
 * mode. To enable it, run:
 *
 * \tchmod u+s /usr/bin/screen
 * \tchmod go-w /var/run/screen


$ locale

LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.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=

Ideas?
Comment 3 DEMAINE Benoît-Pierre, aka DoubleHP 2005-06-06 13:48:04 UTC
root@mercure:~# locale
LANG=en_GB
LC_CTYPE="en_GB"
LC_NUMERIC="en_GB"
LC_TIME="en_GB"
LC_COLLATE="en_GB"
LC_MONETARY="en_GB"
LC_MESSAGES="en_GB"
LC_PAPER="en_GB"
LC_NAME="en_GB"
LC_ADDRESS="en_GB"
LC_TELEPHONE="en_GB"
LC_MEASUREMENT="en_GB"
LC_IDENTIFICATION="en_GB"
LC_ALL=en_GB
root@mercure:~#


I use screen inside Eterm ...
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-06-06 13:55:15 UTC
(In reply to comment #3)

Well, the locales actually don
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2005-06-06 13:55:15 UTC
(In reply to comment #3)

Well, the locales actually don´t not make much difference once UNICODE="yes" is
set in /etc/rc.conf - which is the default if you emerge baselayout with
USE="unicode". 
Comment 6 Alexander Simonov 2005-11-15 01:19:31 UTC
(In reply to comment #4)
> (In reply to comment #3)
> Well, the locales actually don
Comment 7 Alexander Simonov 2005-11-15 01:19:31 UTC
(In reply to comment #4)
> (In reply to comment #3)
> Well, the locales actually don´t not make much difference once UNICODE="yes" 
is
> set in /etc/rc.conf - which is the default if you emerge baselayout with
> USE="unicode". 

what terminal do you use?
Comment 8 Matthias Schwarzott gentoo-dev 2006-11-20 08:59:30 UTC
Does this problem is still existing?
My tests with x86-stable chroot and ~x86-system show that it works for me.
Comment 9 Matthias Schwarzott gentoo-dev 2006-11-21 04:54:41 UTC
A good test seems to be to execute this on a shell prompt:
# source /sbin/functions.sh
# einfo "\tTest! \t\tThis is even more indented."
Comment 10 DEMAINE Benoît-Pierre, aka DoubleHP 2006-11-29 08:20:16 UTC
Can not reproduce because:
- re-installed glibc many times by the mean time
- used to happen in console, not in X
- changed locale
- I never had same locale in X and console
!!! hddtemp and screen ebuilds do not use \t any more !!!

Since ebuilds have been updated, there is no hope to reproduce bug, even with an old emerge program.

Thus, I have to mark bug "WORKSFORME".

I still expect some one to re-open this within few years.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-02-11 14:49:14 UTC
*** Bug 166352 has been marked as a duplicate of this bug. ***
Comment 12 DEMAINE Benoît-Pierre, aka DoubleHP 2007-02-11 15:27:56 UTC
I am emerging dev-libs/libcdio-0.78.2 under chroot (new Gentoo inside the one I opened this bug first for), and I can see:

>>> Regenerating /etc/ld.so.cache...
>>> Original instance of package unmerged safely.
 * If you've upgraded from a previous version of libcdio, you may need to re-emerge
 * packages that linked against libcdio (vlc, vcdimager and more) by running:
 * \trevdep-rebuild

In *this* chroot, which is inside Eterm:
root@moon_gen:~# locale
LANG=en_GB.ISO-8859-15
LC_CTYPE="en_GB.ISO-8859-15"
LC_NUMERIC="en_GB.ISO-8859-15"
LC_TIME="en_GB.ISO-8859-15"
LC_COLLATE="en_GB.ISO-8859-15"
LC_MONETARY="en_GB.ISO-8859-15"
LC_MESSAGES="en_GB.ISO-8859-15"
LC_PAPER="en_GB.ISO-8859-15"
LC_NAME="en_GB.ISO-8859-15"
LC_ADDRESS="en_GB.ISO-8859-15"
LC_TELEPHONE="en_GB.ISO-8859-15"
LC_MEASUREMENT="en_GB.ISO-8859-15"
LC_IDENTIFICATION="en_GB.ISO-8859-15"
LC_ALL=en_GB.ISO-8859-15
root@moon_gen:~#

I will retry this emerge tomorrow, when I can boot this new system.

Emerging this package on the host gentoo produces the same. So, in fact, I could retag the bug as new, and reproductable, but I wont since this old gentoo is to be pushed away in few hours. I will wait to see if I can reproduce after booting the new one.

Also got the same in console with
root@moon_gen:~# locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
root@moon_gen:~#
Comment 13 DEMAINE Benoît-Pierre, aka DoubleHP 2007-02-12 17:46:13 UTC
can reproduce with my new system
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-11-19 06:03:12 UTC
*** Bug 199611 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2008-01-05 03:22:17 UTC
Well, this is getting worse and worse; latest bash (3.2_p33) plain ignores the escape sequences...

$ bash --version
GNU bash, version 3.2.33(1)-release (i686-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.

$ echo -e \tfoo\n
tfoon
$ echo -E \tfoo\n
tfoon

$ source /etc/init.d/functions.sh
$ einfo "\tTest! \t\tThis is even more indented."
 * \tTest! \t\tThis is even more indented.

Huh?!
Comment 16 SpanKY gentoo-dev 2008-01-05 03:55:52 UTC
your examples are plain wrong

the shell processes \t before echo gets it, so the output is correct

einfo no longer expands escape sequences

the only valid case is:
echo -e '\tmoo'

and this works fine for me in UTF8 locales
Comment 17 DEMAINE Benoît-Pierre, aka DoubleHP 2010-07-04 14:45:23 UTC
This bug may be related with bug 326205 ... 
Comment 18 DEMAINE Benoît-Pierre, aka DoubleHP 2010-07-04 15:56:46 UTC
see bug 326887
Comment 19 SpanKY gentoo-dev 2010-10-10 03:36:03 UTC
ive been using UTF8 consoles for a while now and have never seen this issue