This documentation should go elsewhere, but I haven't gotten around to it
yet.

UTF-8
-----

JOE now handles two classes of character sets: UTF-8 and byte coded (like
ISO-8859-1).  It can not yet handle other major classes such as UTF-16 or
GB2312. There are other restrictions: character sets must use LF (0x0A) or
CR-LF (0x0D - 0x0A) as line terminators, space must be 0x20 and tab must be
0x09. Basically, the files must be UNIX or MS-DOS compatible text files.

This means EBCDIC will not work properly (but you would need to handle fixed
record length lines anyway) and character sets which use CR terminated lines
(MACs) will not yet work.

The terminal and the file can have different encodings.  JOE will translate
between the two.  Currently, one of the two must be UTF-8 for translation to
work.

The character set for the terminal and the default character set assumed for
files is determined by the 'LC_ALL' environment variable (and if that's not
set, LC_CTYPE and LANG are also checked).

For example, if LC_ALL is set to:

	de_DE

Then the character set will be ISO-8859-1.

If LC_ALL is set to:

	de_DE.UTF-8

The character set will UTF-8.

Hit ^T E to change the coding for the file.  Hit <tab> <tab> at this prompt
to get a list of available codings.  There are a number of built-in
character sets, plus you can install character sets in the ~/.joe/charmaps
and /usr/local/etc/joe/charmaps directories.

Check: /usr/share/i18n/charmaps for example character set files.  Only
byte oriented character sets will work.  Also, the file should not be
gzipped (all of the charmap file in /usr/share/i18n/charmaps on my computer
were compressed).  The parser is very bad, so basically the file has to look
exactly like the example one in /usr/local/etc/joe/charmaps.

You can hit ^K <space> to see the current character set.

You can hit ` x to enter a Unicode character if the file coding is UTF-8.

Programming
-----------

	Try ^K , and ^K .  These keys select the current block (based on
indentation) and shift it left or right by the -istep and -indentc.

Selecting blocks
----------------

	The "classic" way is to hit ^K B at the beginning and ^K K at the
end.  These set pointers called markb and markk.  Once these are set you
can jump to markb with ^[ b and jump to markk with ^[ k.

	New way no.1: hit Ctrl-space to start selecting, move the cursor,
then hit Ctrl-space to complete the block.  Hit Ctrl-space in the block to
cancel it.  Hit Ctrl-space outside of the block to start selecting a new
one.  This uses the "toggle_marking" function.  Also any block command will
complete the block.

	New way no.2: hit Ctrl-rtarw to start selecting rightward.  Each
time you hit Ctrl-rtarw, the block is extended one more to the right.  This
uses a simple macro: "begin_marking,rtarw,toggle_marking".  Unfortunately,
there is no standard way to get the keysequence given by the terminal
emulator when you hit Ctrl-rtarw.  Instead you have to determine this
sequence yourself and enter it directly in the joerc file.  Some examples
are given for xterm and gnome-terminal.  Hit ` rtarw to have the sequence
shown on your screen.  Note that Putty uses ^[ ^[ [ C which will not appear
with ` rtarw (also ^[ ^[ is set book mark, so you need to unbind it to do
this in Putty).

	Also you can hit Ctrl-delete to cut and Ctrl-insert to paste if the
sequence for these keys are known.
