Commit Graph

2 Commits

Author SHA1 Message Date
Claude Fable 5
bbf6d6b2b9 Expand to twelve single-byte encodings via codegen; match msdos-encodings API
Rework the crate on the msdos-encodings design: vendored Unicode
Consortium VENDORS/APPLE mapping files in data/apple/, a
tools/gen_tables.py generator (PEP 723 / uv run / rustfmt) emitting full
[Option<char>; 256] tables, and a fallible decode / decode_lossy /
encode API with non_exhaustive thiserror errors.

Encodings: Roman, Greek, Cyrillic, Central European Roman, Turkish,
Croatian, Icelandic, Romanian, Celtic, Gaelic, Ukrainian (pre-9.0
Cyrillic variant), Inuit. The eight encodings Apple revised for the
Euro carry a Revision payload (Classic = pre-8.5/9.0/9.2.2), generated
from per-encoding deltas with invariant checks that fail regeneration
if the vendored data drifts.

Apple-specific API points beyond the msdos shape: from_text_encoding
(kTextEncodingMac… base values, the HFS+ hint), from_script_code plus
from_fd_script (bit-7 validity flag on the raw Finder Info byte), and
decode_pstr for length-prefixed Str27/Str31 name fields with a
TruncatedPascalString error for corrupt lengths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v0.1.0
2026-07-19 14:07:44 -05:00
Claude Fable 5
4f1439af65 apple-encodings: initial commit (renamed from mac-encodings)
Bidirectional, emulator-grade conversion between classic Mac OS text
encodings and Unicode. Renamed at extraction-to-shared-crate time
(2026-07-19): consumers will be fsinspect, adx, and ad-decoder via git
dependencies on code.movq.us.
2026-07-19 13:35:48 -05:00