Use screen utility (if exist in system) for workaround for russian language on UTF-8 terminal
This commit is contained in:
parent
36d84095e8
commit
556f0596b0
19
bin/golded
19
bin/golded
@ -1,6 +1,21 @@
|
||||
#!/bin/sh
|
||||
# run this file to launch GoldEd
|
||||
# it also contains workaround for Russian language in UTF-8 encoding
|
||||
# $Id$
|
||||
|
||||
CMD="gedlnx $*"
|
||||
SCREENRC_GOLDED="/usr/share/golded-plus/screenrc_koi8r"
|
||||
SCREEN=`which screen`
|
||||
LUIT=`which luit`
|
||||
if [ -n $SCREEN ]; then
|
||||
CMD_UTF8="$SCREEN -c ${SCREENRC_GOLDED}"
|
||||
else if [ -n "$LUIT" ]; then
|
||||
CMD_UTF8="$LUIT -x -encoding koi8-r -- $CMD"
|
||||
else
|
||||
CMD_UTF8=$CMD
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$LC_ALL $LC_CTYPE $LANG" | grep -q "ru_RU.UTF-8" \
|
||||
&& (export LC_ALL="ru_RU.KOI8-R"; exec luit -x -encoding koi8-r -- gedlnx $*) \
|
||||
|| exec gedlnx $*
|
||||
&& (export LC_ALL="ru_RU.KOI8-R"; exec $CMD_UTF8) \
|
||||
|| exec $CMD
|
||||
|
13
bin/screenrc_koi8r
Normal file
13
bin/screenrc_koi8r
Normal file
@ -0,0 +1,13 @@
|
||||
# $Id$
|
||||
# This configuration file for the screen utility containis workaround
|
||||
# for Russian language on UTF-8 terminal (console) locale
|
||||
# Also this configuration run mailer (binkd in client mode) in background window
|
||||
# for parallel mail transfer
|
||||
|
||||
startup_message off
|
||||
# Set default encoding for new windows
|
||||
defencoding koi8-r
|
||||
# Exec mailer in first window
|
||||
screen /bin/sh -c "binkd -c ~/fido/etc/binkd.conf"
|
||||
# Exec Golded+ in foreground window
|
||||
screen /bin/sh -c "LANG=ru_RU.KOI8-R gedlnx"
|
Reference in New Issue
Block a user