You are not logged in.
This is one of the longer-running issues I can't seem to wrap my head around (and fix). URxvt is my terminal emulator (using i3 in case that matters).
Running locale dumps this:
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
I'm not sure what else I need to do to make URxvt show unicode characters. Any thoughts?
I've been doing a few workarounds, like to my Vim NERDTree dir arrows: https://github.com/tstringer/dotfiles/b … rc#L57-L58
But I'd rather fix this now if possible.
Thank you in advance!
Last edited by thomas_stringer (2017-01-04 20:59:22)
Offline
That's odd. I just tried your font (Fira Mono) in my own Xresources, and unicode displays properly. Are you sure you have rxvt-unicode and not rxvt?
Offline
That's odd. I just tried your font (Fira Mono) in my own Xresources, and unicode displays properly. Are you sure you have rxvt-unicode and not rxvt?
printenv TERM returns "rxvt-unicode-256color".
Funny thing was, colors weren't showing up well, and I had to remove this line from my .Xresources file: https://github.com/tstringer/dotfiles/b … sources#L5
Once I removed that, terminal colors worked. Hoping that it would fix my unicode issue as well, but unfortunately I still get the "boxes" with unicode characters.
Offline
Forcing the term is a bad idea; it just breaks things.
Offline
Forcing the term is a bad idea; it just breaks things.
I removed that, but still no working Unicode characters. What else could cause this?
Offline
Crappy font? Try with Dejavu. Generally, though, it is a locale issue.
Offline
Crappy font? Try with Dejavu. Generally, though, it is a locale issue.
Just tried it with (and now using) inconsolata. Still no good. That seems like a popular font too, I would imagine it has Unicode support.
Stupid question, how could I test Unicode OUTSIDE of Vim? I should probably remove Vim (and my vimrc) out of the equation.
Offline
how could I test Unicode OUTSIDE of Vim?
echo -e "\uXXXX"
where XXXX is a hex code of a character, eg:
$ echo -e "\u0641"
ف
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
thomas_stringer wrote:how could I test Unicode OUTSIDE of Vim?
echo -e "\uXXXX"
where XXXX is a hex code of a character, eg:
$ echo -e "\u0641" ف
Thanks for that! Unfortunately the same result outside of Vim. I get a box returned when I run `echo -e "\u0641"`.
With my output of `locale` (see below), it couldn't perhaps be the double quotes for the vars throwing it off, could it?
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
I'm reaching at straws here, I'm unsure of what else to look at.
Do you see anything blatantly wrong with my .Xresources? https://github.com/tstringer/dotfiles/b … Xresources
The funny thing is, within Chromium the unicode character in my i3 config shows up no problem: https://github.com/tstringer/dotfiles/b … onfig#L100
But if I view the contents of that file in URxvt then I get the dreaded unicode box. So it must be something to do with my terminal [configuration]? Outside of .Xresources, is there any other place I should look for misconfiguration?
Offline
I told you not to force TERM as it breaks things...
https://github.com/tstringer/dotfiles/b … rofile#L13
Offline
What is the output of
$ locale -a
Offline
I told you not to force TERM as it breaks things...
https://github.com/tstringer/dotfiles/b … rofile#L13
That's actually an old .bash_profile from my other machine, the current .bash_profile on this machine has the contents:
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
Offline
What is the output of
$ locale -a
Interestingly enough, here is the output:
C
en_US
en_US.iso88591
en_US.utf8
POSIX
What is the "C"? I had noticed that my original locale had all said "C" prior to generating them. Is this "bad" output for `locale -a`?
Offline
Just playing around, I ran urxvt from urxvt to see what would happen when I try to print out a unicode char. Here is the parent process/terminal output:
trstringer@archdesktop ~
$ urxvt
# comment inserted for explanation: in the child urxvt process I ran `echo -e "\u0642"`
urxvt: unable to calculate font width for ':slant=0:weight=100:pixelsize=24:minspace=True:lang=ar', ignoring.
urxvt: unable to calculate font width for 'Courier New:slant=0:weight=100:pixelsize=24:antialias=False:autohint=True:minspace=True', ignoring.
Is that possibly a/the error that is causing my unicode chars to not show up? (show up as a box)
Offline
What is the output of
$ fc-match 'Courier New:slant=0:weight=100:pixelsize=24:antialias=False:autohint=True:minspace=True'
Offline
What is the output of
$ fc-match 'Courier New:slant=0:weight=100:pixelsize=24:antialias=False:autohint=True:minspace=True'
Cousine-Regular.ttf: "Cousine" "Regular"
Offline
So if I comment out this line in my .Xresources: https://github.com/tstringer/dotfiles/b … sources#L4 (URxvt.letterSpace:-2) then I can print out the unicode character on the command line!
Is that now how you are supposed to "compact" the letter spacing in URxvt? The letters are really wide apart by default.
That was only half of the battle. Even so, in Vim I still can't get the dir arrows in NERDTree or the "chrome" font awesome glyph showing in my i3 config. It seems like the latter might just be a known/ongoing issue with Font Awesome in urxvt though. So I can live with that.
And maybe the dir arrows in NERDTree (Vim) are just not part of the character set that I'm currently using? Either way, definitely progress.
EDIT: Looks like I can reduce the letterSpacing by -1 and still have those unicode chars show up, but any more than that and urxvt can't display them. letterSpace:-1 it is!
Last edited by thomas_stringer (2016-12-31 16:42:33)
Offline
Not sure if your issue is related to mine (you piqued my interest when I read this thread).
I used source code pro for powerline in vim.
URxvt.letterSpace: -1
Prevents the unicode character that trilby suggested above from appearing (I get a little box).
Commenting out the letterspace line makes it possible to view the Arabic character, however, it makes the text a little loose for my taste.
~S
Offline