terminal and konsole windows show strange characters
When I open a terminal or konsole window, output (either STDOUT or STDERR) sometimes contains funny characters instead of something meaningful. Can someone explain how I might correct this situation?
ANALYSIS: One very repeatable example involves using the manual page command Code:
man set In my copy of the output, there are several problems in the very first screen. In the synopsis section, there is "{ value | ?value? ..." Replace the '?' with a lower-case-a-under-a-carat character (a-hat). I suspect the garble character might be apostrophe in real life. In other places, I see var?/able or how?/ever or trans?/action where the '?' is again a-hat and the '/' represents end of line or newline. I suspect the garble character might be a hyphen in real life. All of this suggests that there is a conflict between the character stream written to STDOUT by the man command and the character-display settings (is that "code page" or similar?) of the specific terminal or konsole in use. In specific, I use konsole v1.6.6 from KDE v3.5.10. In general, I'm running Ubuntu Hardy (v8.04.3 LTS). Thanks, ~~~ 0;-Dan |
Is this a recent problem? Does it happen from the kernel console? Does the keyboard render the correct characters? Does it happen everytime, or just occasionally?
You can use xmodmap to see the current translation tables. Another possibility is that your terminal program is not properly interpreting the console control codes. |
here is more detail
A getty console ( ctrl-alt-Fn ) shows the apostrophe and hypen instead of the a-hat.
When I run xmodmap here are the results: Code:
user@host:~$ xmodmap I also get the following: (edited for readability) Code:
user@host:~$ stty --all Code:
user@host:~$ stty --all ~~~ 0;-Dan |
The reason for checking the getty console was to see if it was a problem above or below the kernel/X boundary. Since it works fine from a kernel level console the problem has to be X or above.
The keycode translation tables for X can be viewed with "xmodmap -pk" check where the apostrophe and hyphen are listed. On my machine they are at 48 and 20 (as "minus") respectively. They may be different on you machine. Since X reads the keyboard in raw mode and does it's own translations the termcap/getty settings aren't really important. Also on a Konsole window you can set the character encoding under the Settings/Encoding menu. Try the various options and see if that fixes it. |
Quote:
Code:
20 0x002d (minus) 0x005f (underscore) I will play with the menu-options values within konsole and see what happens. Now where is my VT100 escape code manual... when I looked at Menu->Settings->Encoding Code:
Western European 8859-1 I have the option to select various UTF xxxx options. I tried UTF8 and the a-hat problem resolved. QUESTION: Does this tell me that Code:
man something # implies man | less QUESTION: How do I set this and make it sticky for any use of 'konsole'? of other 'terminal' or 'x-term'? Thanks, again, ~~~ 0;-Dan ~~~ 8d;-Dan |
I just leave the encoding on mine set to "default", I suppose I could plow through documentation to see where it detirmines what the "default" encoding is...does X have a default encoding in the confguration file, hmmm, not sure...but it works so why bother;)
man et. al. are console based programs so I believe they are going to use the "TERM" environment variable to figure out how to do any formatting/special characters. My system has the TERM variable set to "xterm", not really sure what the other options are...again it works as is so why beat my head against that particular wall as well. |
All times are GMT -5. The time now is 05:41 AM. |