		-------------------------------
		rxvt support for greek keyboard
		-------------------------------

		A. Haritsis <ah@doc.ic.ac.uk>


rxvt supports both ELOT-928 (ISO standard) and IBM-437 keyboard 
translations for greek character entry. It is possible to start
rxvt windows in any of the two translations, making it possible to use
both translations modes simultanesuly on the same screen! No need
to convert your files back and forth if you don't want to.

For Greek Elot-928 or IBM-437 keyboard for rxvt & X greek entry support 
you will need to:

1) compile rxvt with an ANSI C compiler (eg gcc) as follows:
Edit file Imakefile and uncomment the line:
/*#define GREEK_SUPPORT/**/ 
Type: 
xmkmf -a
make

and your rxvt executable with greek support should be created. Install it 
as you would do for the normal rxvt. There is no need to change its name.
It works fully as a normal rxvt but if you press the 'toggle' keysym
(see below) it will switch into greek translation mode. The extra memory
it takes in less than 4 kbytes.

2) install greek elot & ibm437 fonts(s) for X-windows
eg.
	cp a_greek_font.pcf.Z /usr/lib/X11/misc/
and ammend the fonts.dir and fonts.alias in /usr/lib/X11/misc/.
Greek fonts are available as a separate file which you can download.
from sunsite (/pub/Linux/X11/misc/greek-xfont-pack.tgz).
I will release another version with more fonts soon. I call people
who have more fonts to contribute to contact me via email.

3) include the following in your X resources:
rxvt.font: grfixed	(or whatever your preferred greek font name is)
rxvt.bits: 8
rxvt.greek_switch_keysym: Mode_switch

(grfixed is an alias for one of the elot-928 font in the pack)

Remember that the default keyboard translation is ELOT928.
If you need to start rxvt with suppport for IBM437, use the command line
of rxvt to set mode & font (command line option -grk4 can do this).
Remember to use an Elot font with the Elot translation mode and 
a 437 font with the IBM437 mode. 

You can choose any keysym you wish as the "toggler" greek_switch_keysym.
Choosing `VoidSymbol' will effectively _disable_ the greek keyboard.
The default is keysym `Mode_switch'.
For XFree86 this is defined in the /usr/lib/X11/Xmodmap.* files as:
keycode 113 = Mode_switch 	(it is the Right Alt key or ALtGr)
You may define it to be something else with a command like:
xmodmap -e "keycode ... = Mode_switch" 
or changing your Xmodmap file (see xmodmap(1) and X(1) about this).
I personally prefer the AltGr key on PC X terminals since it allows fast 
switching.  I would NOT recommend keycodes that have other uses.

5) Not all programs are 8-bit clean (ie they sometimes strip the top bit
of a character which is essential for the greek fonts). Unfortunately
bash is one of these programs (at least I couldn't figure out how to 
make it to work). Use tcsh instead: it is 8-bit clean.

You will generally need to include in your ...rc files:

For sh/bash:
LC_CTYPE=iso_8859_1
LESSCHARSET=latin1
export LC_TYPE LESSCHARSET

For csh/tcsh:
setenv LC_CTYPExiso_8859_1
setenv LESSCHARSET latin1

Still some applications will have problems. Emacs has its own support for
greek characters achieved with the .el script written by sarantos@csd.uch.gr 
(for 19.20 +). It might be possible to have greek support via 
emacs invocations with the -nw argument (with this version of rxvt) but I
have not tried it. Elvis (vi clone) works fine. If some apps do not work,
please direct complaints to their authors stating that you would like them
to be 8-bit clean.

I will soon release a linux version of an 8-bit clean curses lib and versions
of some useful programs that work with it (eg ytalk). Stay tuned...

Do not expect programs that are not running within an rxvt window to have greek
keyboard support. For this, it will be needed to change the Xlib so that it 
supports 4-state FSMs (rather than only 2 - i do not count shift keys or caps 
lock) for keyboard entry (required for greek keyboards).

And something amusing and (maybe) useful: some filesystems (including SunOS and
Linux filesystems; haven't chacked with the rest) allow names with 8-bit 
characters; so you can create files or directories with names containing 
greek characters!

Enjoy,

Angelo Haritsis
