You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Currency signs in PICTURE: £ € ¥ and CURRENCY SIGN / PICTURE SYMBOL mis-size or drop fields; the answer key shares the blind spot #3820
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
What: Only $ is recognised as a currency symbol, and no code parses SPECIAL-NAMESCURRENCY SIGN IS.
On CP285 (UK), byte 0x5B (the default currency sign) arrives as £, so an ordinary UK PIC $$$9.99 reads PIC £££9.99.
Other cases: euro €, yen ¥, and multi-character strings (CURRENCY SIGN IS 'EUR ' WITH PICTURE SYMBOL 'U').
Where:
gitgalaxy/core/mainframe_boundary.py:312: _PIC_CLAUSE uses the character class [-A-Z0-9(),.$/*+].
PIC £££9.99. yields no PIC, so the item becomes a PIC-less group with an unknown width.
PIC 9(5)€. yields 9(5): a 6-byte field becomes 5 bytes.
tests/tools/cobol_answer_key.py:149 (_DD_PIC) and :5794 have the same class.
galaxy_ir._elementary_bytes counts one byte per position, which is wrong for a multi-character currency string.
Impact:
Wrong Java: every later field gets the wrong offset in fromRecord/toRecord.
Harness false pass:layout_fields is built from the same reader, and diff_records compares only the listed fields, so bytes past an under-counted layout are never compared.
Test:
05 A PIC X(3). 05 AMT PIC £££,££9.99. 05 B PIC X(4). with CURRENCY SIGN IS '£'. Expected: AMT at offset 3, width 10; B at offset 13.
A second variant with 'EUR ' WITH PICTURE SYMBOL 'U'.
A deliberately corrupted B must be reported.
Fix:
Parse SPECIAL-NAMES (CURRENCY SIGN, PICTURE SYMBOL, DECIMAL-POINT) into a per-program fact.
Read a PIC as \S+ minus the terminating period, and size currency positions from the declared currency string.
In the harness, compare whole-record bytes too, or fail when the layout width ≠ reclen.
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.
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
#3819: a culture section in the conversion config -- faithful by defa…