Repository navigation
Closed
Labels
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds exist
Description
Follow-up to #3520 (fixed in #3522 for PL/I unit names and the CALL verb only; that PR listed the resource readers as "not changed").
Evidence
A probe estate with Nordic characters in every kind of name was scanned with main (a14f8bbf): PL/I, COBOL (UTF-8 and Latin-1), JCL, CSD and HLASM. The same estate was also scanned transliterated to ASCII as a control. With ASCII names every channel is right, so every row below is caused by the letters.
| channel | source | with the letters | ASCII control |
|---|---|---|---|
| JCL step (unit) | //ÆSTEG1 EXEC PGM=ØKONOMI |
missing | AESTEG1 |
| JCL EXEC PGM= call edge | PGM=ØKONOMI |
missing: the job-to-program edge is lost (and so is its #3237 graph edge) | resolves to the PL/I program |
| JCL DD | //KUNDÆR DD DSN=PROD.KUNDEØ.DATA |
missing entirely | present |
| JCL DSN | DSN=PROD.ÅRSOPPGJØR(+1) |
PROD. (truncated at Å) |
PROD.ARSOPPGJOR(+1) |
| CSD | DEFINE PROGRAM(ØKONOMI) / TRANSACTION(ÆB01) / FILE(KUNDÆR) |
no resources at all, so no transaction map or file lineage | 3 resources |
| HLASM | ØKASM CSECT |
no unit | OKASM |
| COBOL, UTF-8 file | paragraph 100-RÄKNA, item WS-HÄLSNING |
paragraph missing, item WS-H |
both present |
| COBOL, Latin-1 file | 100-RÄKNA, CALL "ÖVERFÖR", WS-HÄLSNING |
100-RKNA, VERFR, WS-HLSNING: bytes silently dropped |
right |
| PL/I | units, DCL items, %INCLUDE ØKOREC, XCTL PROGRAM('BETALÅ'), READ FILE('KUNDÆR') |
right (#3522) | right |
Causes
- Decoding.
galaxyscope.py:494reads every source file asutf-8-sigwitherrors="ignore", so a Latin-1 or cp1252 file loses every non-ASCII byte without a word.- Names and literals corrupt:
CALL "ÖVERFÖR"→VERFR. - For fixed-format sources each dropped byte also shifts the rest of the line one column left, so a line can pull its column 73-80 sequence field into column 72.
- Mainframe exports are commonly Latin-1 / cp1252 / cp1047-converted, not UTF-8.
- Names and literals corrupt:
- ASCII-only name classes in the JCL, CSD and HLASM readers (and COBOL's word class). Keep Unicode and national characters in unit and callee names (#3520) #3522 widened only the shared unit-name normaliser and the CALL verb.
Proposal
- Decode, never drop. Try UTF-8 first. If a file doesn't decode, fall back to Latin-1 (every byte is a character), or a code page the estate declares, and record which encoding each file used. Never
errors="ignore". - Name classes per language, from the language rules:
- where the language allows national characters (JCL, CSD, HLASM, PL/I, REXX, BMS):
@ # $plus Unicode letters (Nordic exports show@#$as ÆØÅ/ÄÖ); - COBOL: Unicode letters in user-defined words and program-name literals. Enterprise COBOL words are ASCII-only, but Micro Focus / GnuCOBOL estates and converted sources carry them, and a literal program name may hold anything.
- where the language allows national characters (JCL, CSD, HLASM, PL/I, REXX, BMS):
- A torture estate in CI. The probe becomes a committed fixture, the same programs in UTF-8, Latin-1 and cp1252, plus the ASCII control, with an assertion per channel: units, calls and their resolution, datasets/DSNs, CSD resources, CICS resources, record items, lineage. Any channel that loses a character fails. Add a Swedish, a German (ÄÖÜß) and a French (é) variant.
- Downstream: check the Java generator's identifiers and file names for these names, and the equivalence harness's encodings.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds exist
Activity
squid-protocol commentedon Sep 26, 2026
Folded into epic #3811 (international text foundation): this issue's probe becomes the gauntlet's mainframe seed, and its causes are parts 2 (decoding) and 3 (identifiers).
Unicode Gauntlet v1: metamorphic scan-equivalence across scripts and …
#3814 (part 2): mainframe names carry national letters (#3855)
#3810: the Nordic torture estate covers COBOL's names and a second jo…