Expand description
MacRoman → Unicode decoding for classic-Mac byte strings.
Classic Mac OS stored text (HFS filenames, STR/vers resource payloads,
resource names, …) as MacRoman (8-bit). Bytes 0x00–0x7F are ASCII;
0x80–0xFF map to the Unicode code points below (the standard Apple
MacRoman table).
Functions§
- cmp_ci
- Compare two MacRoman byte strings the way the classic HFS catalog B-tree
orders names: case-insensitively, byte by byte, with a shorter prefix
sorting before a longer string. The in-memory catalog key order must match
this so the written B-tree is valid for
fsck/Mac OS. - decode
- Decode a MacRoman byte string to a UTF-8
String. - encode
- Encode a UTF-8 string to MacRoman bytes (the inverse of
decode). - eq_
ignore_ case - Case-insensitive equality used for path-component matching. Folds ASCII letters (sufficient for the System-disk style names this reader targets); other characters compare exactly after MacRoman decoding.