PETSCII (Shifted & Unshifted, Combined) / CBM ASCII
PET Standard Code of Information Interchange (PETSCII) was used for Commodore Business Machines and then moved into other Commodore machines (and adjacent machines). It has a “shifted” version (when the shift key was held) and an “unshifted” version (when the shift key was not being held).
The state object for this encoding contains an enumeration that allows the user to select the shifted or unshifted versions at-will.
Aliases
-
class petscii_state
The state associated with an ongoing PETSCII encoding operation.
-
enum class ztd::text::petscii_shift
The current shift state of a PETSCII encoding object and it’s associated state during an encoding operation.
Values:
-
enumerator unshifted
The SHIFT button is not pressed, and character codes should be interpreted as not being “shifted”.
-
enumerator shifted
The SHIFT button is pressed, and character codes should be interpreted as being “shifted”.
-
enumerator unshifted
-
constexpr basic_petscii<char> ztd::text::petscii = {}
An instance of basic_petscii for ease of use.
Base Templates
-
template<typename _CodeUnit = char, typename _CodePoint = unicode_code_point>
class basic_petscii The encoding that matches the PETSCII (CBM ASCII) encoding specification, for shifted characters (when the SHIFT button was pressed on a PET/CBM device).
- Template Parameters:
_CodeUnit – The default code unit type to use when outputting encoded units.
_CodePoint – The code point type to use when outputting decoded units.