Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#3969 - problem with the prompt and UTF-8 locales

Attached to Project: Arch Linux
Opened by Morgan LEFIEUX (Comete) - Monday, 13 February 2006, 21:47 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To No-one
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hello,

i use fr_FR.utf8 locales and i've noticed (a long time ago... but the problem is still here) that there is a "G" near the prompt when i do a "su -".
The problem seems to be in /etc/rc.sysinit: (line 227)

echo 'echo -ne "\e%G"' >> /etc/profile.d/locale.sh


This task depends upon

Closed by  Judd Vinet (judd)
Sunday, 26 February 2006, 19:18 GMT
Reason for closing:  Fixed
Comment by Roman Kyrylych (Romashka) - Wednesday, 15 February 2006, 08:26 GMT
Which terminal do you use?
I have tried to reproduce this behaviour with uk_UA.utf8 but I didn't saw any problem in console and xterm.
I also use Terminal (for XFCE4) and it has problems with non-English locales.
xterm has problems with non-UTF8-locales like uk_UA.KOI8-U.

echo -ne "\e%G" switches console to UTF8 mode.
Each file in profile.d gets executed each time you logs in to console.
locale.sh is not executed when using su, but it executes when using su -, so maybe the problem is because of sending two echo -ne "\e%G" to one physical console screen. But then again I must say that there is no such problem in plain text console and xterm. I doubt that there is any substantional differences between any UTF8 locales. Have you tried to reproduce this behaviour on another terminals?
Comment by Morgan LEFIEUX (Comete) - Wednesday, 15 February 2006, 11:11 GMT
I have this problem in console mode when doing "su -" or with mrxvt, no problem when loging directly in root.
Comment by Roman Kyrylych (Romashka) - Wednesday, 15 February 2006, 13:42 GMT
Could you post your locale.sh, profile, .bashrc here?
Or send it to Roman.Kyrylych@gmail.com, I'll take a look, as I was involved in polishing localization stuff in rc.sysinit
Comment by Morgan LEFIEUX (Comete) - Sunday, 19 February 2006, 13:02 GMT
sorry, but i have no more problem in console mode, i don't know why, neither with xterm, only with mrxvt (maybe because it doesn't support utf-8...)
thanks :)
Comment by Roman Kyrylych (Romashka) - Sunday, 19 February 2006, 13:18 GMT
You are welcome. :)
Anyone has the exactly the same problem as described by Morgan?
If not, then this bug can be closed.
Comment by Roman Kyrylych (Romashka) - Sunday, 19 February 2006, 15:21 GMT Comment by Morgan LEFIEUX (Comete) - Sunday, 19 February 2006, 17:52 GMT
thanks but same problem this this new rc.sysinit
Comment by Roman Kyrylych (Romashka) - Monday, 20 February 2006, 07:25 GMT
Then try to replace
echo 'echo -ne "\e%G"' >>/etc/profile.d/locale.sh
with
echo 'if [ "$TERM" = "linux" ]; then echo -ne "\e%G"; fi' >>/etc/profile.d/locale.sh
in this new rc.sysinit
and check if UTF8 is working in xterm, rxvt, gnome,terminal, Konsole, other terminals (the more you test - the better).
Comment by Roman Kyrylych (Romashka) - Monday, 20 February 2006, 07:39 GMT
And why do you use mrxvt with UTF8 locale, if it does not support UTF8?
If there is no problem with new rc.sysinit (from bug #3996 or from CVS) in xterm, aterm, rxvt, gnome-terminal, Konsole, then the problem is not in %G but in mrxvt. If the problem exists xterm and others terminal, then try the fix above.
Comment by Michal Krenek (Mikos) - Friday, 24 February 2006, 05:01 GMT
I have same problem here with rxvt-unicode. This should really be fixed in rc.sysinit (because that echoed control sequece is only for linux console, not for terminal emulators like rxvt, xterm, etc.)
Comment by Roman Kyrylych (Romashka) - Friday, 24 February 2006, 09:34 GMT
To Mikos:
does the latest rc.sysinit from testing/initscripts still causes problem?

To Mikos and Comete:
does this: http://bugs.archlinux.org/task/3969#comment8295 fixes your problems?
I have tried to use Terminal with uk_UA.utf8 locale and without %G, and UTF8 is not working for me.
Comment by Roman Kyrylych (Romashka) - Friday, 24 February 2006, 09:38 GMT
uk_UA.utf8 locale with %G is working in xterm and Terminal, at least for me.
Comment by Morgan LEFIEUX (Comete) - Saturday, 25 February 2006, 11:05 GMT
Hi Roman !

echo 'if [ "$TERM" = "linux" ]; then echo -ne "\e%G"; fi' >>/etc/profile.d/locale.sh

that works ! thanks ! :)
Comment by Roman Kyrylych (Romashka) - Saturday, 25 February 2006, 16:10 GMT
I checked uk_UA.utf8 again and it works too (with no %G), so my previous post about uk_UA.utf8 not working is wrong.
Yepp, another localization bug fixed. :)
Comment by Judd Vinet (judd) - Sunday, 26 February 2006, 19:17 GMT
Thanks for the investigation, Roman.

Added the conditional to rc.sysinit for -23

Loading...