Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have read all the old posts about this... but I haven't found a good way to fix my particular problem (except a workaround or two).
I have run dpkg-reconfigure locales and have set my locale to en_US.UTF-8
My problem:
In the bash shell man pages don't have the ' (single quote). Instead they display as square blocks. In X in a terminal window the man pages display perfectly.
If I set my locale to en_US.iso-8859-1 man pages display correctly, but X has some minor issues (UXTerm doesn't load properly - it works, but I think it instead defaults to just XTerm instead - not sure). X also displays errors after I exit.
Same goes if I set my locale to en_US.iso-8859-15.
I'm a little confused by this locale deal. I understand that the locale basically tells your computer where you are using it and what languages and charsets to use... I don't understand why there are three options (UTF-8, iso-8859-1 and iso-8859-15).
What locale should I pick?
How can I get both man and X to speak the same language without characters missing or programs not running oddly?
Do I need to dpkg-reconfigure X to match my new locale settings?
Thank you in advance ladies and gents!
P.S. The one workaround I found was to create an alias for man:
Code:
env LC_ALL="en_US" man <whatever>
or
Code:
env LC_ALL="C" man <whatever>
I instead would like to get it completely figured out. I don't like workarounds... but I suppose I can live with them if I have to.
Fixed locale problem in Debian Etch (X and man issues)
Hey guys,
I discovered the error of my ways... well, I guess it wasn't technically my error.
I attempted to fix my problem by doing
Quote:
dpkg-reconfigure locales
I selected the appropriate language and charset and then let it do its job. Below is my /etc/locale.gen file:
Code:
# This file lists locales that you wish to have built. You can find a list
# of valid supported locales at /usr/share/i18n/SUPPORTED. Other
# combinations are possible, but may not be well tested. If you change
# this file, you need to rerun locale-gen.
#
en_US.UTF-8 UTF-8
I was still having issues with X and man. I could get one to work fine but the other would act strangely. Both would function... but one would always have odd side-effects.
I discovered that the SUPPORTED file listed 3 en_US options:
en_US.UTF-8 UTF-8
en_US iso-8859-1
en_US.iso-8859-15 iso-8859-15
**Notice that two of them have a '.' in them followed by a charset, a ' ' (space) and a charset. Onle one has one LANG and one charset separated by spaces.
Well, I got curious. I couldn't figure out why some had '.' in them with two charsets and others had ' ' and one charset.
On a hunch I edited my /etc/locale.gen file:
Code:
# This file lists locales that you wish to have built. You can find a list
# of valid supported locales at /usr/share/i18n/SUPPORTED. Other
# combinations are possible, but may not be well tested. If you change
# this file, you need to rerun locale-gen.
#
en_US UTF-8
I took out the '.' and the extra charset.
Did a
Code:
locale-gen
Then tested man - No more complaint of:
Quote:
man: can't set the locale; make sure $LC_* and $LANG are correct
I think I am COMPLETELY incorrect about changing locale.gen.
I don't think that en_US UTF-8 is correct...
I think it may (perhaps) really be en_US.UTF-8
...
confusing...
...
....
I will definitely post when I get this all sorted out.
Because it bothered me so much to have man not displaying certain characters I decided to change my locale to en_US.iso-8859-15 (to be honest I have no idea how different this is from iso-8859-1, but it is VERY different than UFT-8 from what I've read).
So I got man working perfectly. Just how I want it.
Next on to X
It seems that for whatever reason (in some way related to UXTerm using UTF-8 and since I'm no longer using UTF-8...) UXTerm doesn't load properly so XTerm takes over. For whatever reason XTerm doesn't display the same colors or fonts that UXTerm once did. To remedy this I found the font I wanted to use (man this is a pain of trial and error even when using gtkfontsel and xfontsel).
I recommend running this command in X to try out the different fonts:
Code:
xterm -font <font selection>
I edited my $HOME/.xinitrc file (create it if it doesn't exist) and included this line:
Code:
xrdb -merge $HOME/.Xresources
I edited my .Xresources file (create it if it doesn't exist) and included the font:
I then had two options as far as getting the colors back the way they were (that I could think of).
A)
Copy them from the /etc/X11/app-defaults/UXTerm file or XTerm-color file and put them in my .Xresources file.
or
B)
Edit my .xinitrc file once more and add this line:
Code:
xrdb -merge /etc/X11/app-defaults/XTerm-color
I opted for option B, but I think I may go to A. The reason is because I don't like some of the colors that the menu (control-left click) has... I'm fond of black and grey colors. The default is a orangish-brown color... kinda like wood or something.
Well... this has been my adventure. Man I'm pooped.
I got it just the way I want it tho - that's why I love Linux
I'm still not happy with the fact that I have to use ISO-8859-15 when I want to use UTF-8. I know it doesn't even matter because I only use the English alphabet anyways... but I'm stubborn.
I was wondering if anyone could answer these questions for me:
1) When using UTF-8 why won't man pages display correctly in the log-in shell (not through an X session) but will display correctly in an X-shell?
2) Why do I get the same results (man pages displaying correctly) if I use
Code:
LC_ALL=en_US.ISO-8859-15 man <somepage>
or if I use
Code:
LC_ALL=poop man <somepage>
I will get errors for both... but the man pages display correctly. This is driving me nuts. I can't understand why only the " ' " (apostrophe) won't display correctly. It is the stupidest thing in the world but it is bugging me to no end.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.