• v0.1.0 bbf6d6b2b9

    Expand to twelve single-byte encodings via codegen; match msdos-encodings API

    ahknight released this 2026-07-19 19:07:44 +00:00

    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; 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

    Downloads