Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unicode and Midnight Commander
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 304
Location: Cape Town, South Africa

PostPosted: Mon Jul 10, 2006 2:36 pm    Post subject: Unicode and Midnight Commander Reply with quote

Hi,

I would like to set up my console to use unicode, and can do so with ease, however I have noticed that when using unicode, programs like midnight commander and the kernels menconfig option (that is ncurses apps I guess) don't display correctly, as the borders of dialogs and frames etc... do not display using the right characters. In some cases this even affects the layout of things within the frames (esp in mc). I assume this is a font problem, although I have chosen a unicode font for the console, but I am not sure. Is it perhaps that ncurses isn't unicode aware???

Any ideas how to solve this?

Thanks
James
_________________
Adopt an unanswered post today


Last edited by sirlark on Thu Oct 26, 2006 10:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 10222
Location: Córdoba (Spain)

PostPosted: Mon Jul 10, 2006 5:18 pm    Post subject: Reply with quote

For mc, just compile it with slang instead of ncurses, and you will be fine.

Code:
USE="slang -ncurses" emerge mc


And, if you really plan to use MC, you might also like to know this, also related to the slang vs. ncurses thingie:
https://forums.gentoo.org/viewtopic-t-403389-highlight-midnight+commander.html

It could save you a lot of troubles.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 304
Location: Cape Town, South Africa

PostPosted: Fri Jul 14, 2006 11:22 am    Post subject: Reply with quote

Nope, that doesn't seem to be it... It seems to be an xterm font "problem" i.e. the default font looks screwy, but I've found one that works...

But thanks for the headsup on slang! I've recompiled!
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
aries
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2004
Posts: 127
Location: Sliedrecht the Netherlands

PostPosted: Thu Oct 26, 2006 8:40 pm    Post subject: Reply with quote

Hello Sirlark,

How did you exactly sole this problem? Just by changing the default font only/

I have the same problem as you:
- midnight commander as root is OK
- mc as user gives A´s and 3´s as border
Back to top
View user's profile Send private message
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 304
Location: Cape Town, South Africa

PostPosted: Thu Oct 26, 2006 10:46 pm    Post subject: Reply with quote

Hi, I'm sorry ...

I DIDN'T solve the problem. It turns out my problem was not in fact a unicode issue. My problem was that even without unicode being started, when running any ncurses app with borders n an xterm, things looked screwy! I solved it choosing an appropriate font, namely ...

-*-neep-medium-r-*-*-11-*

which is not a standard font AFAIK... in fact I don't know where I even found it. I have recently tried to get unicode working again, but with the same problem as you, except that instead of displaying odd chracters instead of 'borders' nothing is displayed at all, so nothing in fact that where a border should be, the entire rest of the line is shifted one character to the left, leaving black space n the end for each unprinted character. This happens regardless of the fonts I choose from /usr/share/consolefonts

Sorry again, but good luck in finding a solution, I've been trying now for almost 18 months on and off.
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
aries
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2004
Posts: 127
Location: Sliedrecht the Netherlands

PostPosted: Sat Oct 28, 2006 7:02 pm    Post subject: Reply with quote

Thanks,

Do you have the problems with mc in all terminal emulation modes?

I have the kde terminal applet added to the panel and when I run the KDE terminal emulator as:
1. normal user midnight commander : no problem
2. normal user ´shell´ and run mc : no problem
3. normal user ´linux console´ and run mc : no borders but odd characters
4. root midnight commander: no problem
5. root ´linux console´: no problem

Log in in the bash shell (no kde)
6. midnigth commander: no borders but odd characters.

Don´t know yet why problems only happen for point 3 and 6.
Updating /etc/locale.gen and doing "locale-gen¨ did not help.
Back to top
View user's profile Send private message
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 304
Location: Cape Town, South Africa

PostPosted: Sat Oct 28, 2006 9:32 pm    Post subject: Reply with quote

Hi, use a very bare bones setup, blackbox and xterm ...

How do I go about changing terminal emulations, as I would really like to test the six cases you have outlined?
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
aries
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2004
Posts: 127
Location: Sliedrecht the Netherlands

PostPosted: Mon Oct 30, 2006 8:50 pm    Post subject: Reply with quote

I am afraid our problems are not solved yet :(

The terminal emulation uses:
1: xterm
2: xterm
3. konsole
4: xterm
5: xterm

Details konsole: By default unicode is disabled in the konsole for me.
I tried in the konsole to enable and disable unicode and to use mc:
A. echo -n -e '\033%G'
=> enable unicode
=> mc with strange borderlines and also NOT correctly aligned
=> kernel ´make menuconfig´ NOT correctly aligned
B. echo -n -e '\033%@'
=> disable unicode
=> mc with a ´3´ as border lines but correctly aligned
=> make menuconfig: correctly aligned

With disabled unicode one can use the konsole but it does not look very nice.
Maybe another font corrects the strange borderlines

Details xterm: no problems with unicode
You can start xterm with uncode :
Code:
xterm -u8


I did not test login in the bash shell yet but I think it is the same as point 3.

See also http://gentoo-wiki.com/HOWTO_Make_your_system_use_unicode/utf-8.
Back to top
View user's profile Send private message
aries
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2004
Posts: 127
Location: Sliedrecht the Netherlands

PostPosted: Tue Nov 14, 2006 11:33 am    Post subject: Reply with quote

For this moment I disable unicode in the console.
I can live with this: xterm with unicode works.

Unicode in the console does not work for me: mc and 'make menuconfig' for example show the strange borderlines.
Changing fonts etc does not help, I did not try 'the 'neep' font.

It seems unicode + ncurses (or the way ncurses is used) is a problem.
See also https://forums.gentoo.org/viewtopic-t-495919-highlight-.html

Searching the internet gave me the impression that for menuconfig the use of ncursesw could possibly solve the problem, but I have not tried this yet
(see http://lkml.org/lkml/2005/12/24/66)
Back to top
View user's profile Send private message
dementer
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jan 2004
Posts: 139
Location: New Zealand

PostPosted: Tue Nov 14, 2006 11:42 am    Post subject: Reply with quote

Its not just ncurses you have to rebuild tho, I found a quick reference on google about ncurses dependencies. I usually get this on new installs when Ive been mucking wth the use flags early on.

Also this may come in handy for you
http://gentoo-wiki.com/TIP_Resetting_Your_Console
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum