LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-23-2009, 09:41 AM   #1
ColInvictus
Member
 
Registered: Apr 2009
Posts: 42

Rep: Reputation: 15
unicode fonts in less, stdout not displayed correctly


So I've got unicode set up and seeming to work in most things, I've got LANG set to en_GB.UTF-8. vim and lynx both show as the copyright symbol but less displays the hex code in <>'s and inverse - ie <A9> with the background and font colours inverted, while stdout just displays them as a block. Can anyone suggest how to fix this?
 
Old 08-23-2009, 01:38 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,902

Rep: Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075
At a guess, you have the wrong keyboard set?

Start reading and checking. consoles in X and on Alt_Fn use different software. Anything with a script can set an environment, and some do. Look up /etc/environment. You probably won't have one. Then consoles and X have separate keyboard layouts, etc. Enjoy!
A good way into this is to do a linuxfromscratch which takes you through some of the issues, as you build from scratch. Hacking a sophisticated distro to suit your tastes can be difficult in the extreme.
 
Old 08-23-2009, 02:25 PM   #3
ColInvictus
Member
 
Registered: Apr 2009
Posts: 42

Original Poster
Rep: Reputation: 15
Keyboard is correct, and all this is in a virtual terminal (Alt-Fn). For example:

% echo $'\xA9'
prints a block (A9 being the hex value of '')

% echo $'\xA9' > tmp
% less tmp
shows
<A9>
in inverted colour

% vim tmp
opens the file in vim showing the '', and

% lynx tmp
opens the file in lynx, again showing the copyright symbol. So lynx and vim are properly displaying utf-8 characters, but less (and more and most) and the terminal's stdout aren't. My LANG env variable is set to en_GB.UTF-8, so what am I missing?
 
Old 08-24-2009, 06:44 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,902

Rep: Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075Reputation: 1075
Just look at the man pages for less and more. Ignore the command options and concentrate on variables. Things will default to the en_US C or POSIX.

What about $TERM $LC_CTYPE $LC_ALL and all the others less looks at?
What about /etc/environment? Nobody can steer you through this without an immense amount of time. If you want it, go after it, and keep backups.

BTW, an unwritten rule in these things is that when someone offers to help and asks a question, you answer it as precisely as you can. Otherwise, we end up talking with you when you wander in circles, and nothing gets done. Let your next post include the answers to what has been asked.
 
  


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
Fonts not displayed correctly using sudo ahh Linux - General 3 02-04-2006 05:46 AM
Unicode fonts for aterm? matthias_k Linux - Software 0 10-30-2005 03:38 AM
About unicode fonts koyi Linux - General 5 06-06-2005 06:31 PM
CD-Rom ,filenames are not displayed correctly Darklegion Linux - General 4 08-28-2004 02:46 AM
unicode not displayed in gucharmap etc lars12 Slackware 0 10-22-2003 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:58 PM.

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