Skip to content

Zoned overpunch table is the US code page's: German / Nordic / French / Italian data throws on every value ending in 0 #3826

Closed

Description

@squid-protocol

What: {, } and A–R as sign characters hold only for CP037/500/1047/284/285. Under a national code page, bytes 0xC0 and 0xD0 are other characters (probe):

Code page 0xC0 (positive zero) 0xD0 (negative zero)
CP273 (German) ä ü
CP277 (Danish/Norwegian) æ å
CP278 (Finnish/Swedish) ä å
CP280 (Italian) à è
CP297 (French) é è

Where:

  • cobol_to_java_repository_forge.py:139 (POSITIVE = "{ABCDEFGHI").
  • tests/tools/equivalence_common.py _OVERPUNCH.
  • equivalence_inputs.encode_field.

Impact: The Java codec throws invalid zoned sign, and the harness decodes <invalid>.

Test: A German S9(5)V99 value of +100.00 whose last byte shows as ä. Expected: 100.00 on both sides.

Fix: Derive the sign table from the configured code page (0xC0–C9 and 0xD0–D9 decoded through it), or decode zoned fields from bytes. Shares the code-page configuration with #3816.

Found by a cultural-assumptions audit (2026-09-26): confirmed in code or by probe (JDK 17 locales, IBM code-page decoding, the harness's GnuCOBOL image) unless marked plausible.

🤖 Generated with Claude Code

Activity

  1. added
    bugUnintended behavior or logic failure in the engine
    legacy-modernizationCOBOL refractor, dead-code extraction, and JCL forging
    priority: highCore feature broken, but workarounds exist
    on Sep 26, 2026
  2. added a commit that references this issue on Sep 26, 2026
  3. added a commit that references this issue on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnintended behavior or logic failure in the enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds exist

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions