GSTrans string encoding is a method of encoding all 8-bit values 0-255 as printable characters. It is normally used as a way of passing non-printable characters on a command line, such as with the *KEY and *ECHO commands, for example: *KEY 4 RUN|M or *ECHO |V|F|S|@4000. It is also used to pass binary data over a text-only link, such as with TeleSoftware and some email protocols.
Implementations can include GSInit, GSRead routines to translate character by character
and GSEncode, GSDecode routines to translate whole strings in one go. Decoding methods deal with invalid sequences in different ways, either reporting an error or skipping them.
Characters are encoded with the | escape character in the following way:
0-31 |letter eg |@, |A, |i |[ etc., case ignored
32-126 character, except for:
128-255 |! followed by encoding, eg |!|@ = 128
A string can be surrounded in quotes, eg "ALERT|G".
See also RISCOS documentation.
Demo of GSECHO on DOS/Windows