Skip to content

Legacy CJK code pages: the Unicode Gauntlet declares Shift-JIS / GB18030 as an estate would; the scan reports files that need a declaration #3878

Closed

Description

@squid-protocol

Part of epic #3811. Follows #3813 (the decoding foundation) and #3875 (C-family names), which found that the C-family cells still failing do so only in Shift-JIS / GB18030, "as every language's cells do".

Problem

88 of the 263 cells in tests/unicode_gauntlet/baseline.txt fail only in shift_jis or gb18030, 22 each for Cyrillic, Greek, Han and Kana, across every language and the mainframe seed. These aren't name bugs: the file is decoded wrongly before any name rule runs.

The gauntlet scans these cells without declaring anything. It is testing a situation the engine is designed not to solve, and it hides whether the path a real Japanese or Chinese estate would use actually works.

Plan

  1. The gauntlet declares the code page. Estates encoded in Shift-JIS or GB18030 are scanned with --source-encoding <codec>, which is how a real estate would be scanned. galaxy_ir.scan_to_db gains an extra_args parameter to pass the flag through. Cells that start passing leave the baseline. cp1252 cells stay undeclared, since the fallback handles those correctly and is exactly what they test.
  2. The scan says when a declaration is needed (follow-up). When files fell back to cp1252 / Latin-1 but decode strictly as a common CJK code page, the LLM brief's "4.1 SOURCE ENCODINGS" section says so and suggests --source-encoding. The engine never switches encodings on its own.

Verification

  • unicode_gauntlet.py --ci passes and the baseline shrinks. Every cell leaving it is a shift_jis / gb18030 cell; any that still fails once declared is a real finding and gets named.
  • The golden masters and ground-truth ledger don't change: nothing is declared in those scans.

🤖 Generated with Claude Code

Activity

  1. added
    core-engine
    on Sep 27, 2026
  2. added 3 commits that reference this issue on Sep 27, 2026
  3. added
    status: pending-release
    on Sep 27, 2026
  4. squid-protocol commented on Sep 27, 2026

    @squid-protocol
    OwnerAuthor

    Both parts merged:

    🤖 Generated with Claude Code

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

    core-enginestatus: pending-release

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions