Module altura

Module altura 

Source
Expand description

Altura Mac2Win character translation tables.

Altura Mac2Win is/was a cross-platform compatibility runtime used by applications such as Panorama for Windows. Internal data in .pan files is stored in Mac OS Roman across platforms; when running on Windows, Altura Mac2Win uses 128-byte lookup tables (covering bytes 0x80..=0xFF) to translate between Mac OS Roman and Windows ANSI (Windows-1252). Some characters that are not shared between the encodings are changed to different characters when files are transferred between operating systems.

Altura is not a unique character encoding itself: internal file contents are standard Mac OS Roman, and the translated output is standard Windows-1252 (Windows ANSI). This module provides Altura’s specific 128-byte lookup tables (0x80..=0xFF) used to transliterate between Mac OS Roman and Windows-1252, including Altura’s fallback substitutions for glyphs that do not exist in both sets.

Functions§

ansi_to_mac_roman
Translates a slice of Altura Windows ANSI bytes to Mac OS Roman bytes.
ansi_to_mac_roman_byte
Translates a single Altura Windows ANSI byte to Mac OS Roman.
mac_roman_to_ansi
Translates a slice of Mac OS Roman bytes to Altura Windows ANSI bytes.
mac_roman_to_ansi_byte
Translates a single Mac OS Roman byte to Altura Windows ANSI.
mac_roman_to_utf8_windows
Converts Mac OS Roman bytes into a UTF-8 string from the Windows user perspective (translating via the Altura ANSI table and decoding as Windows-1252).
utf8_windows_to_mac_roman
Converts a UTF-8 string into Mac OS Roman bytes from the Windows user perspective (encoding as Windows-1252 and translating via the Altura ANSI table).