Skip to content

Java runtime accepts non-ASCII digits as numbers (Arabic-Indic, Devanagari, full-width) where COBOL NUMERIC/NUMVAL would not #3831

Closed

Description

@squid-protocol

What: Probe: Character.isDigit('١') is true; new BigInteger("١٢") gives 12, as does full-width 12; Integer.parseInt("१२") gives 12. CobolRecords.zoned / decimal() (repository_forge.py:179,256) therefore accept data the mainframe would reject. And decimal("1,5") throws even in a decimal-comma program.

Test: A screen input of ١٢٣ or 123 in a numeric field. Expected: COBOL's invalid-data path.

Fix: Validate [0-9] explicitly; add a NUMVAL helper that honours DECIMAL-POINT.

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
    on Sep 26, 2026
  2. added a commit that references this issue on Sep 30, 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 forging

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions