Beta Code to/from UTF-8 Unicode Conversion Package

GNU Unifont
Unicode Tutorial
Hangul Fonts
Fontforge Poll
Checking .sigs

The Unibetacode package contains programs to convert between the Beta Code encoding method for polytonic Greek and UTF-8 Unicode. These programs are designed to accept textual input from the Beta Code specification as implemented by the Thesaurus Linguae Graecae (TLG) Project at the University of California, Irvine, and also by the Perseus Project of Tufts University. The programs only handle character encodings, not the formatting codes (superscripts, font size changes, etc.) of the full TLG Beta Code specification.

There are three programs in this package:

The source package contains examples in the "examples" directory, which are also used to test the programs once installed on a system. Two short samples appear below.

Example — Byzantine Musical Symbols

The TLG Beta Code specification includes special numeric codes in the range "#2000" through "#2245" that map to Unicode Supplementary Multilingual Plane Byzantine Musical Symbols, as just one example of its special numeric codes. The unibetaprep program converts those codes to the Unicode extension to Beta Code that is unique to this Unibetacode package. However, Unicode has become the standard for exchange of textual information. There is no corresponding program to convert a file back to using the special numeric codes of the TLG Beta Code specification, and there are no plans to create such a program.

TLG-specific Special Numeric Code Input to unibetaprep:

     #2070 &(U+1D046)$ *)/ison
     #2071 &(U+1D047)$ *)oli/gon
     #2078 &(U+1D04E)$ *kenth/mata
     #2073 &(U+1D049)$ *petasth/
     #2081 &(U+1D051)$ *)apo/strofos

Unibetacode's Unicode Extension to Beta Code; Output from unibetaprep, Input to beta2uni:

     {\u1D046} &(U+1D046)$ *)/ison
     {\u1D047} &(U+1D047)$ *)oli/gon
     {\u1D04E} &(U+1D04E)$ *kenth/mata
     {\u1D049} &(U+1D049)$ *petasth/
     {\u1D051} &(U+1D051)$ *)apo/strofos

Beta Code Conversion to UTF-8 Unicode; Output from beta2uni:

     𝁆 (U+1D046) Ἴσον
     𝁇 (U+1D047) Ὀλίγον
     𝁎 (U+1D04E) Κεντήματα
     𝁉 (U+1D049) Πεταστή
     𝁑 (U+1D051) Ἀπόστροφος

Note the context-dependent conversion of the ASCII letter 's' in the Beta Code input to small medial (middle) sigma or small final sigma in the UTF-8 Unicode output. Note also that the ASCII Beta Code letters are lowercase, following the convention of the Perseus Project.

Example — Genesis 1:1

Beta Code Encoding Input to beta2uni:

     &Koine Greek (Septuagint):$
     *)en a)rxh=| e)poi/hsen o( *qeo\s to\n ou)rano\n kai\ th\n gh=n.

UTF-8 Unicode Output from beta2uni:

     Koine Greek (Septuagint):
     Ἐν ἀρχῇ ἐποίησεν ὁ Θεὸς τὸν οὐρανὸν καὶ τὴν γῆν.

Reference Documents

The focus of Beta Code is an ASCII encoding of classical Greek, and the default encoding is ASCII Beta Code conversion to Greek UTF-8 Unicode. This package can be of use to those wanting to type polytonic Greek who are already good typists of ASCII letters.

Unix-style man (manual) pages are listed below. The unibetacode man page describes the Beta Code format that these utilities implement, so read it first. Examples in the "examples" directory in the source code demonstrate practical use.

More information is available in the following documents:

The source tarball and GnuPG signature file can be downloaded at these links:

Installing Unibetacode

To install the Unibetacode package on a system with a Unix-style command line interface (GNU/Linux, FreeBSD, Mac OS X, Cygwin, etc.), type these commands in a terminal window:

     make check
     make install
     make clean

The "make check" command will run five tests using sample text files that are in the "examples" directory.

The "make install" command might need to be run as "sudo make install" on your system. By default, the programs will be installed in "/usr/local/bin" and the man (manual) pages will be installed in "/usr/local/share/man/man1" and "/usr/local/share/man/man5".


The software on this site, unless otherwise noted, is released under the terms of the GNU General Public License (GNU GPL) version 2.0, or (at your option) a later version.

Valid HTML 4.01 Transitional Valid CSS! Best Viewed with Any Browser