From: esz001@cck.coventry.ac.uk (Will Overington)
Newsgroups: soc.culture.esperanto
Subject: Expressing Esperanto text on computer systems 3.
Keywords: Esperanto accents, computer systems.
Date: 16 Apr 92 13:31:12 GMT
Followup-To: soc.culture.esperanto
Organization: Coventry Polytechnic, Coventry, UK



16th April 1992

A new method for expressing Esperanto text on computer systems.
A further extension of the system.

W. J. G. Overington

Department of Electrical, Electronic and Systems Engineering,
Coventry Polytechnic,
Priory Street,
Coventry CV1 5FB
England.

In the two previous papers I outlined a new method for expressing
Esperanto text on computer systems.

The technique is that an accented Esperanto character is signaled
in one of several ways, depending upon the situation.

If the accented character is either the first or second letter of
a sentence, the presence of the accent is indicated by entering
the first letter of the sentence as lowercase.  The steloj
software then changes the first letter of the sentence to become
uppercase and accents the first letter that could carry an
Esperanto accent, whether it is the first or second letter of the
word.  This decision is based solely upon whether the letter is
any one of C, c, G, g, H, h, J, j, S, s, U, u.

If the accented character is either the first or second letter of
any word in a sentence other than the first word, the presence of
the accent is indicated by an underscore character immediately
preceding the word, even if there is an end of line between the
underscore character and the word.  In display, the underscore
character is shown as a space.

An additional feature is that should a situation arise where an
unaccented u is to be followed by an accented Esperanto
character, at the start of a word, (here, for example, not at the
start of a sentence), say, for example, c circumflex, then the
sequence may be expressed by _yc where the underscore character
will be shown as a space and the y character as an unaccented u.

All other accented letters are indicated by the case of the
letter being the opposite of the case of the second letter of the
word.  The steloj software changes the case to be the same as the
case of the second letter of the word, and accents the character.

After I had publish the first paper in this series, Rick Miller,
<rick@edu.uwm.ee>, e-mailed me to suggest that I include a
feature so that the special character processing could be turned
off, for example, so that one could explain, in a document
displayed using the steloj system, how to enter Esperanto text,
without the underscore characters in fact producing Esperanto
text instead of the desired instructional text.

I have therefore added the following feature.  An accented Q or
an accented q will turn the Esperanto Engine off.  The accented Q
will display a character that shows the word off in tiny letters
and the accented q will display a space.  The turning off of the
Esperanto Engine will thus take up two character positions.  When
the Esperanto Engine is off, either of the characters { or } will
turn the Esperanto Engine back on, the { will display a character
that shows the word on in tiny letters and the } will display a
space.

When the Esperanto Engine is on, the characters { and } may be
used normally.

The steloj system takes a character c and produces an integer
called cAsInteger, which is the number of the character in the
steloj character coding system.

The steloj character coding system numbers are identical to the
PC set, together with the following additions.

256    C circumflex
257    c circumflex
258    G circumflex
259    g circumflex
260    H circumflex
261    h circumflex
262    J circumflex
263    j circumflex
264    S circumflex
265    s circumflex
266    U breve
267    u breve
268    off logo
269    on logo

The Esperanto Engine itself uses four state variables, namely an
integer called positionInWord and three Boolean variables called
startOfSentence, accentFirstOrSecond and secondLetterUppercase.
There is also the Boolean state variable usingEsperantoEngine,
which decides whether production of an Esperanto display is
required or whether to look out for occurrences of { or }
characters.

At the start of the program, these variables are initialized as
follows.

usingEsperantoEngine:=TRUE;
positionInWord:=0;
startOfSentence:=TRUE;
accentFirstOrSecond:=FALSE;
secondLetterUppercase:=FALSE;

When using the Esperanto Engine, the character c is first tested
as to whether it is an underscore, a full stop, an exclamation
mark, a question mark or a space and, if so, updating of some of
the state variables takes place, as appropriate.  If not, the
Esperanto Engine computes a value of cstar, which is an exact
copy of c unless startOfSentence is TRUE and c is a lowercase
letter, in which case cstar is the uppercase version of the
letter and cAsInteger is altered to be that of this uppercase
letter.  If this case altering takes place, accentFirstOrSecond
is set as TRUE.  The Esperanto Engine then uses cstar for all
subsequent testing, altering values of the state variables and
cAsInteger for the current character as required.  The value of c
itself is never altered.

The whole Esperanto Engine and the checking involved when it is
not in use are contained within an IF statement, namely,

IF usingEsperantoEngine THEN
   software
   software
   software
ELSE (* not usingEsperantoEngine *)
   software
   software
   software
END; (* IF usingEsperantoEngine *)

I have realized that in neither state of usingEsperantoEngine is
it possible to display ordinary text which contains both _ and {
or } characters.  In the particular case of the steloj program
itself this need not matter.  However, in the event that the
steloj method becomes used for, say, sending articles in
soc.culture.esperanto and a special version of kermit were
produced so that one could read usenet messages, from various
newsgroups, using a PC, then it would be necessary to have
another Boolean variable called, say, activeEsperantoEngine,
which would be FALSE for reading articles from other newsgroups
and articles in soc.culture.esperanto which were not steloj
compatible, and TRUE for steloj compatible articles.

Copyright (c) 1992 W. J. G. Overington at Coventry Polytechnic.
Published in the usenet newsgroup soc.culture.esperanto.
This article may be made freely available on server systems.
You might like to call the file steloj3.cov

Publication elsewhere requires an arrangement with Coventry
Polytechnic Enterprises Limited, Priory Street, Coventry CV1 5FB,
United Kingdom.

Prospective publishers are asked to think in terms of a statement
that the text will be published as it stands, without any
editorial alteration; that such publication does not imply
transfer of copyright; two free subscriptions to the publication
and a sum of money.