You are not logged in.
Pages: 1
I'm having a problem with certain unicode symbols not displaying properly in terminals (urxvt OR xterm). They'll display fine in any X-based editor (http://i.imgur.com/kRcvmYE.png) but just show up as blocks in terminals (http://i.imgur.com/vvRPFbC.png). My searches so far seem to imply it's an issue with locale settings, but everything seems fine on that front:
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=en_US.UTF-8
locale -a:
C
en_US
en_US.iso88591
en_US.utf8
POSIX
Uncommented lines in locale.gen:
en_US.UTF-8 UTF-8
en_US ISO-8859-1
locale.conf:
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
$TERM:
rxvt-unicode-256color
Upon running urxvt:
urxvt: the locale is not supported by Xlib, continuing without locale support.
And xterm:
Warning: locale not supported by Xlib, locale set to C
Warning: X locale modifiers not supported, using default
Other possibly relevant info: Awesome WM
Any suggestions?
Offline
https://github.com/exg/rxvt-unicode/blo … src/init.C says it may have something to do with XIM.
Last edited by karol (2013-05-14 14:20:28)
Offline
I don't believe that it's an issue with urxvt alone - the problem occurs in xterm as well.
Offline
I know, but this is the only trace so far: are you using any input method?
Edi 1: I have
$ echo $TERM
rxvt-256color
but I don't know if this changes anything.
Edit 2: Google shows quite a few hits for the error that xterm shows, unfortunately I haven't found any explanation yet e.g. https://bbs.archlinux.org/viewtopic.php?id=67850 is different from your case.
Last edited by karol (2013-05-14 15:16:03)
Offline
Your terminal emulator might just use the wrong fonts.
Offline
Your terminal emulator might just use the wrong fonts.
Why would it print the locale warning then?
Offline
cookies wrote:Your terminal emulator might just use the wrong fonts.
Why would it print the locale warning then?
Good point, I missed that. Sorry.
Offline
How are you setting the TERM variable? You can get strange behavior if TERM is set incorrectly, which seems to be the case here. If you have set TERM in ~/.bashrc or ~/.bash_profile, you should remove it. When TERM is not set correctly, the terminal may use the wrong TERMINFO database – meaning strange things happen in the terminal display.
With a stand-alone urxvt, 'echo $TERM' returns 'rxvt-unicode-256color' here. I have done nothing to set TERM for urxvt.
Xterm has two term settings that seem to work well for most people, 'xterm' and 'xterm-256color'. Since your locale seems to be set correctly, try this in your X resources:
XTerm*locale: true
! Vim colorschemes lag for me with TERM set
! to the default 'xterm'.
! The following line is optional.
xterm*termName: xterm-256color
Offline
How are you setting the TERM variable?
I'm not setting TERM anywhere; it's defaulting to 'rxvt-unicode-256color' or 'xterm-256color' which seems to be the correct value. The .Xresources changes don't seem to have made any sort of impact either - at least not one that's visible to me.
Out of curiosity, what output are any of you getting from 'localectl status'?
Offline
Out of curiosity, what output are any of you getting from 'localectl status'?
System Locale: LANG=en_GB.utf8
VC Keymap: de-latin1-nodeadkeys
X11 Layout: n/a
Offline
I think this has to be a font problem, now. What are your font settings? But the locale warnings make me still wonder.
Last edited by thisoldman (2013-05-15 10:57:31)
Offline
localectl status matches cookies' in syntax, so I don't think it's a config issue there.
I don't think it's a font issue as I'm getting the same results with the couple other fonts I tried out. It has something to do with how the characters are displayed in the terminals; they still show fine in any X-based text editor.
Offline
Have you tried other unicode characters? Do those get displayed correctly or does your terminal emulator turn them into blocks, too?
If other unicode characters get displayed correctly then your current font does not have a graphical representation for your chosen characters and replaces them with a placeholder. http://en.wikipedia.org/wiki/List_of_Unicode_characters has some nice examples.
Offline
Have you tried other unicode characters? Do those get displayed correctly or does your terminal emulator turn them into blocks, too?
Other unicode characters display properly in graphical editors but not terminals, even when using the same font in both. The confusing part is I have an old Arch VM on the same computer and it doesn't have this problem, even with identical locale settings and font.
Last edited by Velmorkon (2013-05-16 12:45:11)
Offline
GUI editors use fontconfig rules to substiue glyphs when the chosen font does not have the glyph available. Urxvt and xterm only have the glyphs available in the fonts you specify. If the font chosen for either of those two terminal emulators does not have the character included, at best you will get an empty rectangle.
There are other terminal emulators that do use fontconfig.
Offline
Pages: 1