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
Legacy CJK code pages: the Unicode Gauntlet declares Shift-JIS / GB18030 as an estate would; the scan reports files that need a declaration #3878
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.
A Shift-JIS or GB18030 file is not valid UTF-8 and has no byte-order mark.
So read_source falls through to its cp1252 / Latin-1 guess, and every CJK name comes out garbled.
Byte patterns can't reliably identify these encodings. GB18030 decodes almost any byte sequence, and a lot of cp1252 text is also valid GB18030, so guessing would silently corrupt Western estates instead.
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
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.
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.
Activity
#3878: lower the gauntlet baseline -- 58 Shift-JIS / GB18030 cells pa…
#3878 (part 1): the Unicode Gauntlet declares Shift-JIS / GB18030, as…
#3878 (part 2): the scan says when a legacy-guessed file reads as a C…
squid-protocol commentedon Sep 27, 2026
Both parts merged:
🤖 Generated with Claude Code