LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-15-2018, 09:57 AM   #1
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,668

Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
Some characters not displaying properly in Terminal


Every once in a while I need to display some 'umlauts'. I have no problem, when running X and using an xterm. However, when I am not running a Desktop environment the umlauts do not display properly. I have tried setting different locales, e.g.,

Code:
export LC_ALL=C
export LANG=C
export LC_ALL=en_US
export LANG=en_US
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
but none of them worked. Additionally, whenever I use a UTF-8 locale, midnight commander also displays garbage on its margins. Is there a way to solve this issue when running a terminal without X?

PS: Running on Slackware 14.2
 
Old 04-15-2018, 11:49 AM   #2
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,026

Rep: Reputation: 166Reputation: 166
What does
Code:
setfont -v
return? Available fonts are in /usr/share/kbd/consolefonts/ ; linux loads default

Code:
/etc/rc.d/rc.font
sets the font also.

Last edited by RandomTroll; 04-15-2018 at 11:52 AM. Reason: Added info
 
Old 04-15-2018, 02:45 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,612

Rep: Reputation: Disabled
  • Set the keyboard properly, for instance:
    Code:
    loadkeys de
  • Use any locale with an UTF-8 encoding.
  • Use a font with an unicode map and the needed glyphs, for instance:
    Code:
    setfont ter-124b
  • When you are satisfied with your settings store them in /erc/rc.d/rc.keymap and /etc/rc.d/rc.dont and make these scripts executable.
 
Old 04-15-2018, 04:15 PM   #4
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,668

Original Poster
Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
Quote:
Originally Posted by RandomTroll View Post
What does
Code:
setfont -v
return? Available fonts are in /usr/share/kbd/consolefonts/ ; linux loads default

Code:
/etc/rc.d/rc.font
sets the font also.
The output is
Code:
Loading 256-char 8x16 font from file /usr/share/kbd/consolefonts/default8x16.psfu.gz
Loading Unicode mapping table...

@didier:
I have tried all of it without success. Not sure if this is relevant, but after I issued 'loadkeys de' I was not able to type umlauts. The characters that were printed instead were '[' and ']'.

Last edited by crts; 04-15-2018 at 04:17 PM.
 
Old 04-15-2018, 05:40 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,612

Rep: Reputation: Disabled
I don't know what is your keyboard mapping. Can you type directly the umlaut vowels (with a single key) and which ones exactly do you want to type?

To know which glyphs are available in the font currently in use, just type:
Code:
showconsolefont
 
Old 04-15-2018, 05:52 PM   #6
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,668

Original Poster
Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
Quote:
Originally Posted by Didier Spaier View Post
I don't know what is your keyboard mapping. Can you type directly the umlaut vowels (with a single key) and which ones exactly do you want to type?

To know which glyphs are available in the font currently in use, just type:
Code:
showconsolefont
This is the output of 'showconsolefont'
Code:
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    

    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `
Just to be clear: I do not mind that I am not able to type umlauts. As I stated earlier, I just need to display some every now and then, usually when I receive a file that has them in its name. I simply mentioned that I cannot type them just in case it may provide some further insight on what the underlying problem might be.
 
Old 04-15-2018, 06:00 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,612

Rep: Reputation: Disabled
Quote:
Originally Posted by crts View Post
This is the output of 'showconsolefont'
Code:
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    

    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `    
    !  "  #  $  %  &  '  (    )  *  +  ,  -  .  /  0    
    1  2  3  4  5  6  7  8    9  :  ;  <  =  >  ?  @    
    A  B  C  D  E  F  G  H    I  J  K  L  M  N  O  P    
    Q  R  S  T  U  V  W  X    Y  Z  [  \  ]  ^  _  `
Using which font? This not what I get, neither with default8x16 nor with ter-16b.

I don't see even lower case letters, which is rather weird.

Last edited by Didier Spaier; 04-15-2018 at 06:05 PM.
 
Old 04-15-2018, 06:19 PM   #8
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,668

Original Poster
Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
This is the output of 'showconsolefont' after I redirect it into a file. I just noticed that the output on the console itself is different. However, in order to copy paste it I have to redirect it to a file, since I cannot reproduce the errors in a GUI environment. Well, I guess I am stuck with this bug. Thanks anyway.
 
Old 04-15-2018, 06:20 PM   #9
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,026

Rep: Reputation: 166Reputation: 166
Your high-bit-set characters are duplicates of your low-bit characters. You need a new font. Go to /usr/share/kbd/consolefonts and try some of the lat* , probably the high ones, such as 15 or 16. Run
Code:
setfont [fontname]
then
Code:
showconsolefont
and look for diacritically-marked characters in the high-bit characters. You can rename the default character set to something else then link the character set you like to the default name.
 
Old 04-16-2018, 01:59 AM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,612

Rep: Reputation: Disabled
Quote:
Originally Posted by crts View Post
Well, I guess I am stuck with this bug.
Please don't say there is a bug without providing any evidence.

You can just make a snapshot of the console in a virtual machine, or use a camera and post the image or a link to it.
 
Old 04-16-2018, 03:52 AM   #11
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,463

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Quote:
Originally Posted by Didier Spaier View Post
You can just make a snapshot of the console in a virtual machine, or use a camera and post the image or a link to it.
Just run your commands in a screen session and direct console output to a file:
Code:
screen
showconsolefont
screen -X hardcopy
Your console output will be in a file called hardcopy.0 in the current directory.
 
Old 04-16-2018, 09:07 AM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,612

Rep: Reputation: Disabled
Quote:
Originally Posted by Gerard Lally View Post
Just run your commands in a screen session and direct console output to a file:
Code:
screen
showconsolefont
screen -X hardcopy
Your console output will be in a file called hardcopy.0 in the current directory.
Doesn't work here, says:
Code:
couldn't find file descriptor referring to the console
What do I miss?

Otherwise I just installed Slackware64-14.2 in a VM (no custom console font, all default settings) and get the attached pic.

So all umlout vowels are there.

Maybe a misfit with the encoding of the file being printed by the OP? Make sure it's encoded in UTF-8 if you are using a font with an unicode map.
Attached Thumbnails
Click image for larger version

Name:	VirtualBox_Slackware64-14.2_16_04_2018_14_54_56.png
Views:	16
Size:	8.6 KB
ID:	27450  
 
Old 04-16-2018, 09:21 AM   #13
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,463

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Quote:
Originally Posted by Didier Spaier View Post
Doesn't work here, says:
Code:
couldn't find file descriptor referring to the console
What do I miss?
Do it as root.
 
1 members found this post helpful.
Old 04-16-2018, 09:39 AM   #14
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,612

Rep: Reputation: Disabled
Quote:
Originally Posted by Gerard Lally View Post
Do it as root.
It worked, thanks Gerard.

However I don't get the same glyphs as typing showconsoelfont directly in a VT (and I don't get the umlaut vowels, by the way). Does screen sets a specific font?

Sorry for the newbie question, I never started screen until today.

Last edited by Didier Spaier; 04-16-2018 at 09:56 AM.
 
Old 04-16-2018, 10:23 AM   #15
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware, Crux, NetBSD
Posts: 1,463

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
Quote:
Originally Posted by Didier Spaier View Post
It worked, thanks Gerard.

However I don't get the same glyphs as typing showconsoelfont directly in a VT (and I don't get the umlaut vowels, by the way). Does screen sets a specific font?

Sorry for the newbie question, I never started screen until today.
Well, that's interesting! Same problem here! I don't think screen sets its own font; I moved back to screen from tmux because it seems better behaved. It must have something to do with $TERM ; on the console, it's linux, and in screen (running on the console), at least here, it's screen-256color

But even on the linux console I don't get the glyphs I was expecting (with ter-v16b).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
arrow keys are not displaying properly with terminal server telnet session, manju37 Linux - Kernel 2 01-17-2014 04:19 AM
[SOLVED] Problem displaying Unicode special characters in Urxvt/rxvt-unicode terminal shahinism Slackware 4 10-22-2012 04:08 PM
odbc (php output not displaying in web browser,but it displaying in terminal) manu@vssc Red Hat 1 06-29-2011 02:33 AM
Displaying Unicode Characters Whatif Programming 6 02-21-2011 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration