Fun with UEB Modes - SusanJ/UEB_back GitHub Wiki

Consider the following UEB braille which is displayed in a standard ASCII Braille transliteration.

#b;b b

The #b is both a UEB numeric mode start indicator and also the braille symbol for the print digit 2. As a numeric indicator it turns on numeric mode (which of course turns off the current default mode). Also, whenever numeric mode is turned on, it immediately turns on a special Grade 1 mode that doesn't have its own indicator. Got that? There are now two modes active although the special Grade 1 mode doesn't have any effect until the numeric mode that turned it on gets deactivated somehow.

The ; is a Grade 1 symbol indicator which is one of the braille symbols that deactivates numeric mode so the letter following it now means the print letter b, not the digit 2. Meanwhile, although the numeric mode is no longer active, the special Grade 1 mode still is.

No matter what symbol occurs immediately after the symbol that follows a Grade 1 symbol indicator, the Grade 1 symbol indicator is deactivated before processing that second symbol since the scope of a symbol indicator is always one symbol. In this example the second symbol happens to be a space.

Meanwhile the special Grade 1 mode might be still active. However, since the special Grade 1 mode is deactivated by a space (and a by few other symbols including a hyphen) it coincidentally also gets deactivated in this example.

So after processing just a few braille symbols we've turned on and then deactivated numeric mode, Grade 1 symbol mode, and special Grade 1 mode and are finally back to whatever default mode we started with! If the default mode of the example is contracted braille then the final letter b is the contraction for the word but.

Of course developing software to automate the correct use and interpretation of the example situation isn't rocket science. It is, nonetheless, somewhat of a software engineering challenge to implement this and other similar situations that occur in UEB in a maintainable manner.