You are not logged in.

#1 2012-02-20 14:00:34

arbulus
Member
Registered: 2007-12-25
Posts: 45

[SOLVED]ncurses applications non-English characters instead of lines

Here's a screen shot to illustrate what's happening: http://i.imgur.com/SJv0B.png

It only seems to happen when I'm in X. If I'm just at the console without X, I see everything as it should be, but in X, the ncurses apps display stragely like this. I use urxvt, but I also tried it in xterm and it gives the same result.

Any ideas what might be going on?

Last edited by arbulus (2012-02-23 22:33:54)

Offline

#2 2012-02-21 12:19:51

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: [SOLVED]ncurses applications non-English characters instead of lines

Looks like the wrong font is being used. According to the ncurses website, this is usually down to a terminfo mismatch:

http://invisible-island.net/ncurses/ncu … ms_display

There's three things I'd check here:

1) What is your TERM setting?

echo $TERM

I use urxvt and mine is "rxvt-256color"
(I think rxvt-unicode-256color will work okay, too?)

2) What are your locale settings? Type locale. On mine only LC_ALL is empty.
If there's any exotic languages there, you may need to tweak stuff, but I'm not sure what.

3) Do you have the right terminfo files - its name should match the TERM value?
See /usr/share/terminfo/r for urxvt (the sub dirs are divided alphabetically)
(Note don't try and cat a terminfo file).

Basically you're trying to remove any mismatch between these.
Also, the tput man page recommends putting

export TERM=mytermtype
tput init 

In your profile.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#3 2012-02-21 20:20:31

arbulus
Member
Registered: 2007-12-25
Posts: 45

Re: [SOLVED]ncurses applications non-English characters instead of lines

skanky wrote:

Looks like the wrong font is being used. According to the ncurses website, this is usually down to a terminfo mismatch:

http://invisible-island.net/ncurses/ncu … ms_display

There's three things I'd check here:

1) What is your TERM setting?

echo $TERM

I use urxvt and mine is "rxvt-256color"
(I think rxvt-unicode-256color will work okay, too?)

2) What are your locale settings? Type locale. On mine only LC_ALL is empty.
If there's any exotic languages there, you may need to tweak stuff, but I'm not sure what.

3) Do you have the right terminfo files - its name should match the TERM value?
See /usr/share/terminfo/r for urxvt (the sub dirs are divided alphabetically)
(Note don't try and cat a terminfo file).

Basically you're trying to remove any mismatch between these.
Also, the tput man page recommends putting

export TERM=mytermtype
tput init 

In your profile.

My term is rxvt-unicode-256color. I have the terminfo files in my home directory. I saw some info that basically just said copy the /usr/share/terminfo to ~/.terminfo, which i did. It has rxvt-unicode-256color in there. all of my locale settings are "C". I added the export TERM and tput init to my .bashrc (my .bash_profile just sources my .bashrc) and then sourced it, but it didn't have any effect.

Offline

#4 2012-02-22 09:58:52

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: [SOLVED]ncurses applications non-English characters instead of lines

Okay firstly sorry, the TERM setting should be set in .Xdefaults eg

URxvt.termName: rxvt-256color

You can remove the setting in .bashrc (doing it in .Xdefaults makes it easier to get change it for each term type).
Sorting out TERM and locale have always fixed any ncurses character issues for me in the past, though I've never had it all set to C before.

So otherwise I'm not really sure. The LC_CTYPE is the locale setting that's used by the terminal.

You could try setting the locale to "en_US.UTF-8".
If you need another locale, try that one first and change it if it works.

The closest I've found to your issue is this thread:

https://www.linuxquestions.org/question … ss-788608/

Which is really more of the same.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#5 2012-02-23 22:31:36

arbulus
Member
Registered: 2007-12-25
Posts: 45

Re: [SOLVED]ncurses applications non-English characters instead of lines

skanky wrote:

Okay firstly sorry, the TERM setting should be set in .Xdefaults eg

URxvt.termName: rxvt-256color

You can remove the setting in .bashrc (doing it in .Xdefaults makes it easier to get change it for each term type).
Sorting out TERM and locale have always fixed any ncurses character issues for me in the past, though I've never had it all set to C before.

So otherwise I'm not really sure. The LC_CTYPE is the locale setting that's used by the terminal.

You could try setting the locale to "en_US.UTF-8".
If you need another locale, try that one first and change it if it works.

The closest I've found to your issue is this thread:

https://www.linuxquestions.org/question … ss-788608/

Which is really more of the same.

I added URxvt.termName: rxvt-256color to my .Xdefaults, and changed LC_CTYPE to UTF8. I also reinstalled ncurses and rebooted. Not sure which one of these did the trick, but it's working as it should now. Thank you!

Offline

#6 2012-02-24 10:23:58

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: [SOLVED]ncurses applications non-English characters instead of lines

Well you could test the first two wink
Anyway, nice one. smile


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

Board footer

Powered by FluxBB