Skip to content

NervaPack v0.7.2 — EBCDIC support for mainframe COBOL/RPG

Choose a tag to compare

@ramdhavepreetam ramdhavepreetam released this 05 Aug 16:25
· 17 commits to master since this release

EBCDIC support for mainframe COBOL/RPG

Real IBM i / z/OS source members are usually stored in EBCDIC, not ASCII/UTF-8 — so before this release they decoded to garbage. NervaPack now auto-detects EBCDIC and decodes it with the correct code page before parsing.

Added

  • Automatic EBCDIC detection & decoding. Uses a robust EBCDIC-space (0x40) vs. ASCII-space (0x20) signal; EBCDIC line endings (0x25, NEL 0x15) are normalized to \n. Default code page is cp037 (US/Canada).
  • NERVAPACK_EBCDIC override:
    • auto (default) — heuristic detection
    • cp037 / cp500 / cp1140 / cp273 / … — force a code page
    • off — always read as UTF-8
    • Unknown/mismatched codecs fall back to UTF-8 rather than failing the ingest.
  • New module nervapack.parser.encoding.

Upgrade

pip install -U nervapack        # 0.7.2
# or, for a known-EBCDIC repo:
NERVAPACK_EBCDIC=cp037 nervapack ingest /path/to/members

Docs: https://github.com/ramdhavepreetam/NervaPack/blob/master/docs/user-guide/concepts/ibm-i-languages.md#ebcdic-encoded-members
PyPI: https://pypi.org/project/nervapack/0.7.2/