xterm garbage characters
I noticed that in xterm, a lot of characters are shown as "â" instead of what's supposed to be there. This character often replaces the apostrophe in man pages and makes gcc error messages useless by turning the faulty code samples into garbage characters. This does not happen in gnome-terminal.
Here is a sample error from gcc, as shown in xterm: Code:
error: â has no member named â |
This has to do with the LANG environment variable - type echo $LANG and you'll likely see something like:
en_US.UTF-8 If the terminal session you're using is not using that translation you'll see oddities. For example the default "translation" in PuTTY terminals is "ISO-8859-1:1998 (Latin-1, West Europe)". If you change it to be UTF-8 it matches the the shell variable mentioned above and gets rid of the garbage. So the question is when you say "xterm" do you mean the xterm termtype (which is used in things like PuTTY and other emulators) or do you mean the actual "xterm" X Window program. If the latter you'll have to work out what your particular implementation is using for default translation. |
It has to do with the LANG var and the unicode characteristics of your system. It also has to do with the FONT being used by your xterm.
|
Quote:
|
Interesting - I just found a program called "luit" that will run your program with UTF-8. It came with xorg-x11-apps package so you likely have it as well.
Typing "luit man <manpage>" may solve your problem in an xterm window. Or maybe you need to launch it with "luit xterm". Both commands worked for me |
launching a terminal using "luit xterm" didn't help.
|
Did you try "luit man <manpage>"?
|
Didn't help either.
But I am more concerned about the compiler (because errors are rendered almost useless) than about man pages (where it is just a small nuisance). |
Did you verify LANG variable is set to UTF-8 (en_US.UTF-8)?
I recall having resolved similar issue some time ago by changing LANG variable to C: export LANG=C |
|
Quote:
|
I figured it out, it's:
Code:
en_US.UTF-8 |
To see what a variable is set to you do "echo $VAR" so in this case it would be "echo $LANG".
To change the variable do the "export LANG=C" I mentioned above. To change it back to the "export LANG=en_US.UTF-8" Note these only change it for your current session. You'd have to modify your .bash_profile or .bashrc to make the change permanent. Don't do that until you determine if setting it at command line has resolved your issue. |
I found that "export LANG=C" worked, but how do I make it permanent, and what is C?
|
All times are GMT -5. The time now is 02:35 AM. |