sextile.viewdata.charset

The teletext G0 character set displayed by the SAA5050 in BBC Mode 7.

G0 occupies positions 0x20-0x7F and coincides with ASCII everywhere except the thirteen national-option positions, which here take their English values per ETS 300 706. Two of those transpositions bite immediately: 0x23 displays a pound sign rather than a hash, and the hash – the viewdata command key – sits at 0x5F.

Ten characters a modern keyboard offers have no G0 representation at all: [ \ ] ^ _ ` { | } ~. Those positions are occupied by arrows, fractions and rules instead. Quoted source code meets them constantly, so encode_g0 reports them as unrepresentable rather than guessing; deciding what to show in their place belongs to the transliteration layer.

sextile.viewdata.charset.is_representable(character)[source]

Whether G0 can display a character directly, without transliteration.

Parameters:

character (str)

Return type:

bool

sextile.viewdata.charset.mosaic_code(pattern)[source]

The character code drawing a 2x3 block pattern.

Bits from least to most significant are top-left, top-right, middle-left, middle-right, bottom-left, bottom-right – the order sextant uses, so the two agree about which block is which.

Parameters:

pattern (int)

Return type:

int