Beta Code is a method of representing, using only ASCII characters, characters and formatting found in ancient Greek texts (and other ancient languages). Its aim is to be not merely a romanization of the Greek alphabet, but to represent faithfully a wide variety of source texts – including formatting as well as rare or idiosyncratic characters.
Beta Code was developed by David W. Packard in the late 1970s and adopted by Thesaurus Linguae Graecae in 1981. It has become the standard for encoding polytonicGreek and has also been used by a number of other projects such as the Perseus Project (which encodes all its Ancient Greek texts using Beta code, the Packard Humanities Institute, the Duke collection of Documentary Papyri, and the Greek Epigraphy Project at Cornell and Ohio State University. Beta Code can be easily converted to a variety of systems for display, most notably the Unicode. Systems such as Sophokeys for typing Beta Code but producing Greek glyphs directly in the entered text (rather than when it is typeset or otherwise output) are increasingly popular, with the result that Beta Code, with some variations, has become a sort of universal default keymap for text entry in polytonic Greek.
The TLG Beta Code Manual uses upper-case ASCII letters to represent Greek letters. A variant (used by the Perseus Project) uses lower-case ASCII letters instead. In both cases, the unadorned ASCII letter represents a lower-case Greek letter, and an asterisk must be added to indicate an upper-case Greek letter.
In general, one encoding character S for Greek sigma is sufficient; it is interpreted as a final sigma at the end of words or when followed by punctuation, and as a medial sigma in other positions. In cases where this auto-disambiguation is not correct, the specific codes S1 and S2 are available.
The codes *S3 and S3 for lunate sigma are deprecated and do not occur in new texts; TLG regards the lunate sigma as a glyph variant of medial and final sigmas and unifies lunate sigma with these, using *S and S (or, if necessary, S1 or S2, as appropriate), respectively.
Some representations use J for the final sigma and S for the medial sigma.