I have this problem:
our default terminal encoding is UTF-8, but we have some legacy
termnal-based applications which require iso8859-1 (latin1) encoding.
Until recently we used on RHEL-5 the KDE environment. Terminals under
kde are provided by the 'konsole' program, and it is possible to control
the encoding aof a konsole window (after it is started) via dcop.
We rune our legacy-application via a shell script like this:
export LANG=en_US
if [ "$KONSOLE_DCOP_SESSION" != "" ]; then
dcop $KONSOLE_DCOP_SESSION setEncoding "ISO 8859-1"
fi
/usr/local/bin/legacy-application $*
if [ "$KONSOLE_DCOP_SESSION" != "" ]; then
dcop $KONSOLE_DCOP_SESSION setEncoding UTF8
fi
Now we want to switch the GNOME desktop.
The terminal program there is gnome-terminal.
While it is easy to change the encoding by hand via the menu
Terminal-Set_character_encoding
I have not (yet) found out whether this can be scripted in a similar way
to the KDE dcop system.
Can anyone with more GNOME experience tell me how? Please be aware that
it should change an existing terminal window while it is already open,
not open a new one with a different encoding. Because if we wanted a
different window, we could simply start 'konsole' instead of
'gnome-terminal'.
----------
PS:
the reason we switch from KDE to GNOME is that KDE-konsole is buggy in
regard to handling of Chinese fonts. It uses Japanese fonts also for
Chinese, resulting in many missing characters for simplified characters
not present in Japanese fonts. Apparently this is a fualt of qt in RHEL5.
GNOME-terminal on the other side handles chinese fonts correctly, and
has the nice feature that the terminal window can zoom in and out, which
is nice when you deal with Asian fonts and are 60 years old like me.
These asiain fonts have nothing to do with the legacy application
needing latin1, but we like to run many things in the same terminal
windows, being old fashioned command line hackers.
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list