You are not logged in.

#1 2012-07-12 17:13:57

MrAllan
Member
Registered: 2008-12-08
Posts: 132

urxvt problem with UTF-8 characters

Hey,

for some reason, urxvt fails to display some UTF-8 characters correctly. The same characters are correctly displayed in other terminals.

Here's some info about my system:

$ locale -a
C
en_US.utf8
POSIX
$ 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=

How can I make urxvt display the characters correctly?

Last edited by MrAllan (2012-07-12 17:14:28)

Offline

#2 2012-07-12 17:33:02

Banton
Member
Registered: 2010-05-28
Posts: 67

Re: urxvt problem with UTF-8 characters

and what characters are you talking about?

Offline

#3 2012-07-12 18:08:25

angelfalls
Member
Registered: 2012-03-26
Posts: 139

Re: urxvt problem with UTF-8 characters

i admits you want to use en_US.UTF-8 UTF-8 then uncomment en_US.UTF-8 UFT-8 in /etc/locale.gen then use command: locale-gen (sudo if need).

Offline

#4 2012-07-12 20:16:20

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: urxvt problem with UTF-8 characters

Banton wrote:

and what characters are you talking about?

For example '▸'. In urxvt, it is displayed as an empty rectangle. The font does support this character, though (I have checked it in other terminals / applications). Maybe the font declaration method is faulty? I'm using this:

URxvt.font: -*-dejavu sans mono-medium-r-normal-*-*-*-*-*-*-*-*-u
angelfalls wrote:

i admits you want to use en_US.UTF-8 UTF-8 then uncomment en_US.UTF-8 UFT-8 in /etc/locale.gen then use command: locale-gen (sudo if need).

I've done that already.

Last edited by MrAllan (2012-07-12 20:16:36)

Offline

#5 2012-07-12 20:25:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: urxvt problem with UTF-8 characters

Isn't dejavu a ttf font?  Can you select ttf fonts in that format?

Even if you can, I'm pretty sure it'd need to be quoted due to the spaces.

edit: a quick test answered my two questions, and verified my suspicion.  Quote the font string.

Last edited by Trilby (2012-07-12 20:26:25)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2012-07-12 20:48:48

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: urxvt problem with UTF-8 characters

Trilby wrote:

Isn't dejavu a ttf font?  Can you select ttf fonts in that format?

Even if you can, I'm pretty sure it'd need to be quoted due to the spaces.

edit: a quick test answered my two questions, and verified my suspicion.  Quote the font string.

I'm not sure what you mean exactly, but I tried both of these and both failed (unable to load base fontset, please specify a valid one):

"-*-dejavu sans mono-medium-r-normal-*-12-*-*-*-*-*-*-u"
-*-"dejavu sans mono"-medium-r-normal-*-12-*-*-*-*-*-*-u

Offline

#7 2012-07-12 20:50:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: urxvt problem with UTF-8 characters

Hmm, I was attempting from the command line, perhaps thats different.  On that, can you get these characters working when you set a font from the command line, ie

urxvt -fn "-*-dejavu sans mono-medium-r-normal-*-12-*-*-*-*-*-*-u"

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2012-07-12 20:56:48

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: urxvt problem with UTF-8 characters

dejavu is a ttf font, use xft.

URxvt*font: xft:Dejavu Sans Mono:size=12

Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#9 2012-07-12 21:01:51

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: urxvt problem with UTF-8 characters

Trilby wrote:

Hmm, I was attempting from the command line, perhaps thats different.  On that, can you get these characters working when you set a font from the command line, ie

urxvt -fn "-*-dejavu sans mono-medium-r-normal-*-12-*-*-*-*-*-*-u"

Have you really tried it? For me, the character is still a blank rectangle.

Mr.Elendig wrote:

dejavu is a ttf font, use xft.

URxvt*font: xft:Dejavu Sans Mono:size=12

This doesn't work. Any ideas why?

Offline

#10 2012-07-12 21:20:05

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: urxvt problem with UTF-8 characters

I don't know how print that little triangle, but I have this in my .Xresources:

URxvt.font: xft:DejaVuSansMono:pixelsize=18

Too, I remember that a little error typing and it load another font.

Last edited by Alber (2012-07-12 21:20:57)


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#11 2012-07-12 21:25:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: urxvt problem with UTF-8 characters

Using that command line works for me.  I don't get the triangle, but I get all the characters I'd expect.  In looking at the deja vu font, I can't find a glyph that looks like that triangle, so I wouldn't even know how to attempt to get it to show up.

edit: I can paste that character into my terminal started as above, and it shows up as a triangle.  I can even put it in an echo command and it echos properly.

edit2: lets get the silly question out of the way: ttf-dejavu is installed, right?

Last edited by Trilby (2012-07-12 21:29:19)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2012-07-12 21:48:24

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: urxvt problem with UTF-8 characters

Trilby wrote:

Using that command line works for me.  I don't get the triangle, but I get all the characters I'd expect.  In looking at the deja vu font, I can't find a glyph that looks like that triangle, so I wouldn't even know how to attempt to get it to show up.

edit: I can paste that character into my terminal started as above, and it shows up as a triangle.  I can even put it in an echo command and it echos properly.

edit2: lets get the silly question out of the way: ttf-dejavu is installed, right?

Yes, ttf-dejavu is installed. Maybe the solution is this. Unfortunately, I just destroyed my entire system while doing an update, so I won't be able to try anything else while I'm fixing that...

Offline

#13 2012-07-12 23:11:06

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: urxvt problem with UTF-8 characters

Im thinking in compose key, Python to write down and try that kind of unicode-character. But more easy

Trilby wrote:

I can paste that character into my terminal started as above, and it shows up as a triangle.  I can even put it in an echo command and it echos properly.

paste and echo.
echo -e $'\342\226\270'
▸

@MrAllan
Sorry about your system.

Last edited by Alber (2012-07-12 23:13:30)


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

Board footer

Powered by FluxBB