You are not logged in.

#1 2012-10-15 02:29:58

joshdmiller
Member
From: California
Registered: 2010-04-25
Posts: 51
Website

[SOLVED] Special Characters in Terminal Emulator Display Incorrectly

I have for a couple of years set my PS1 as below:

PS1='\n\[\033[0;32m\]┌┼─┼─ \[\033[0m\033[0;32m\]\u\[\033[0m\] \
@ \[\033[0;36m\]\h\[\033[0m\033[0;32m\] ─┤├─ \[\033[0m\]\t \d\[\033[0;32m\] ─┤\
├─ \[\033[0;34m\]\w\[\033[0;32m\] ─┤ \n\[\033[0;32m\]└┼─\
\[\033[0m\033[0;32m\]\$\[\033[0m\033[0;32m\]─┤▶\[\033[0m\] '

I reinstalled Arch recently, and now the symbols in this prompt no longer display correctly in terminals while running X, regardless of the font I select (though Terminus is my font of choice):

$ cat ~/.bash/prompt
PS1='\n\[\033[0;32m\]ââ¼ââ¼â \[\033[0m\033[0;32m\]\u\[\033[0m\] \
@ \[\033[0;36m\]\h\[\033[0m\033[0;32m\] ââ¤ââ \[\033[0m\]\t \d\[\033[0;32m\] ââ¤\
ââ \[\033[0;34m\]\w\[\033[0;32m\] â⤠\n\[\033[0;32m\]ââ¼â\
\[\033[0m\033[0;32m\]\$\[\033[0m\033[0;32m\]ââ¤â¶\[\033[0m\] '

I've tried rxvt-unicode and sakura. However, this prompt displays correctly outside of X.

$ cat /etc/locale.conf 
LANG="en_US.UTF-8"
LC_COLLATE="C"
LC_TIME="en_DK.UTF-8"

Last edited by joshdmiller (2012-10-15 17:04:56)

Offline

#2 2012-10-15 02:34:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Special Characters in Terminal Emulator Display Incorrectly

Post the output of 'locale' and 'locale -a'.

Offline

#3 2012-10-15 02:52:45

joshdmiller
Member
From: California
Registered: 2010-04-25
Posts: 51
Website

Re: [SOLVED] Special Characters in Terminal Emulator Display Incorrectly

Should have thought of that. Here you go:

$ 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=

$ locale -a
C
POSIX
en_DK
en_DK.iso88591
en_DK.utf8
en_US
en_US.iso88591
en_US.utf8

Offline

#4 2012-10-15 02:56:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Special Characters in Terminal Emulator Display Incorrectly

Try creating ~/.config/locale.conf with LANG="en_US.UTF-8"
https://plus.google.com/114015603831160 … zKCcnTWDpa

Offline

#5 2012-10-15 04:42:39

joshdmiller
Member
From: California
Registered: 2010-04-25
Posts: 51
Website

Re: [SOLVED] Special Characters in Terminal Emulator Display Incorrectly

karol wrote:

Try creating ~/.config/locale.conf with LANG="en_US.UTF-8"
https://plus.google.com/114015603831160 … zKCcnTWDpa

Thanks for the suggestion. I created the file, logged out and back in. Unfortunately, this did not solve the problem.

$ cat $HOME/.config/locale.conf
LANG="en_US.UTF-8"

In case it helps, I am using XMonad launched with xinit.

Offline

#6 2012-10-15 17:04:43

joshdmiller
Member
From: California
Registered: 2010-04-25
Posts: 51
Website

Re: [SOLVED] Special Characters in Terminal Emulator Display Incorrectly

I figured it out. Upon a reboot, I noticed an error indicating "/etc/profile.d/locale.sh" could not be found. This post, reporting a similar issue, gave me the solution: https://bbs.archlinux.org/viewtopic.php … 7#p1169057. I reinstalled the package "filesystem", which replaced the file. All is well.

Thank you everyone for your help.

Offline

Board footer

Powered by FluxBB