Repository navigation
Description
Goal: the check that refuses a C1 control in $OPENREPOSHAPE_BIN_DIR is decided for the two names it answers by bytes alone: a GBK or GB18030 name that holds hanzi is not refused as a control character, and a lone C1 byte that an 8-bit terminal acts on is not placed, or each is said to be a known limit in the refusal's words and on the issue.
Filed by lane openRepoShape-5, from the checklist candidates of #760's PR (#804, writer w760, "Checklist candidates (not filed)": "A lone 0x9B byte ... matches in no locale" and "A GBK or GB18030 locale reads 0xC2 0x80 to 0xC2 0x9F as hanzi, so the arm refuses a directory holding one. Measured with codecs only"). Lane 2's #841 (the fix for #837) names the second for its own 29 characters in its "Left out" ("refused all the same. Not measured: no such locale can be built here") and fixes neither. Both lines are about the same check in two files, and both are limits #804 documents and leaves.
Lands after: lane 5's #760 (PR #804, fix/760-bin-dir-control-chars, head 7e4181c0), which adds the check: main has none (git grep cntrl in install.sh and openRepoShape finds nothing), and lane 2's #837 (PR #841, fix/837-bin-dir-format-chars, head cc5ae88e, stacked on #804), which adds misdrawn_characters beside it. path:line is at #804's head, with #841's said where it differs.
Lines
- A GBK or GB18030 locale reads
0xC2 0x80to0xC2 0x9Fas one hanzi each, and the check refuses a directory holding one as "a control character". The check is(LC_ALL=C; case "$bin_dir" in *[[:cntrl:]]* | *$'\302'[$'\200'-$'\237']*) exit 0 ;; *) exit 1 ;; esac)(install.sh:389andopenRepoShape:471;install.sh:427andopenRepoShape:537at install.sh and openRepoShape: a$OPENREPOSHAPE_BIN_DIR, the repository or a ref holding a bidi control, a character of no width, a soft hyphen or U+2028 is refused by its code point before any request and never echoed, so no line shows the value as another #841's head). UnderLC_ALL=Cit matches bytes whatever the person's locale, by design (install.sh and openRepoShape: both refuse a$OPENREPOSHAPE_BIN_DIRholding a control character before they name it, and install.sh refuses a:before its fetch, so a carriage return or an escape is no longer echoed as typed (#760) #804's body: "The arm is the same in every locale"). Measured here with Python's codecs only:gbk,gb18030andcp936decode all 32 pairs from0xC2 0x80to0xC2 0x9F(0xC2 0x9Bis one hanzi ingbk);big5,euc_krandeuc_jpdecode none;cp932reads0xC2 0x80as a half-width katakana and a stray byte. No GBK locale or charmap is installed here (locale -alistsC,C.utf8andPOSIX), so the check itself was not run in one, and install.sh and openRepoShape: a$OPENREPOSHAPE_BIN_DIR, the repository or a ref holding a bidi control, a character of no width, a soft hyphen or U+2028 is refused by its code point before any request and never echoed, so no line shows the value as another #841 could not build one either. So in such a locale a directory named with one of those 32 hanzi is refused with the control-character message and nothing is placed. It fails closed, says the wrong thing, and does so for those 32 characters only. install.sh and openRepoShape: a$OPENREPOSHAPE_BIN_DIR, the repository or a ref holding a bidi control, a character of no width, a soft hyphen or U+2028 is refused by its code point before any request and never echoed, so no line shows the value as another #841'smisdrawn_charactershas the same property for its 29 entries, and its mutation table keeps a survivor for it: droppingLC_ALL=Cfrom its call changes the answer only in a multibyte locale that is not UTF-8 (install.sh and openRepoShape: a$OPENREPOSHAPE_BIN_DIR, the repository or a ref holding a bidi control, a character of no width, a soft hyphen or U+2028 is refused by its code point before any request and never echoed, so no line shows the value as another #841's body, C02 and I02). Direction: decide first whether it is worth acting on. If so, ask the locale's charset (locale charmap, under the person's ownLC_ALL,LC_CTYPEandLANG, before the subshell setsLC_ALL=C) and run the byte match only where it is UTF-8 or a single-byte charset; for another multibyte charset, either refuse nothing the locale reads as a letter, or say in the refusal that the bytes read as a control character in UTF-8. If not, put it in the refusal's own words ("holds a control character, or bytes that are one in UTF-8") and leave it as the limit install.sh and openRepoShape: both refuse a$OPENREPOSHAPE_BIN_DIRholding a control character before they name it, and install.sh refuses a:before its fetch, so a carriage return or an escape is no longer echoed as typed (#760) #804's body already states. - A lone
0x9Bbyte, an 8-bit C1 control that is not UTF-8, is placed and echoed as typed. Measured here by copying the check'scasefrominstall.sh:389at7e4181c0into bash 5.2.21 and running it on/tmp/x, one byte andy, underLC_ALL=Cand underC.UTF-8: the byte0x9Balone is placed (not refused) in both;0xC4 0x9B(U+011B, e with a caron) is placed in both;0xC2 0x9B(U+009B) is refused in both;0xC2 0xA0(U+00A0) is placed in both. install.sh and openRepoShape: both refuse a$OPENREPOSHAPE_BIN_DIRholding a control character before they name it, and install.sh refuses a:before its fetch, so a carriage return or an escape is no longer echoed as typed (#760) #804's own table has the row ("a lone 0x9B byte | all three | placed | placed") and its candidate 2: "Only an 8-bit terminal with C1 controls on acts on it". Not run throughinstall.shor the command here. Direction: decide first whether it is worth a rule. A byte pattern for0x9Bcannot be added to the check as it stands: the byte is inside UTF-8 characters (measured with Python: 316 code points below U+3000 hold a0x9Bbyte in their UTF-8, among them U+011B), so it would refuse a valid name. The rule needs to know the byte is not part of a UTF-8 sequence, which is a validity step the shell has no builtin for; or it is left as the documented limit, since the person set the variable themselves and only a terminal in 8-bit mode acts on the byte.
Verify: tests/test_openreposhape_command.py, tests/test_install_sh.py, tests/test_install_sh_filter_repo.py and tests/test_openreposhape_package.py pass on Linux. The first line has no test that runs a GBK locale: none can be built here or on CI. Where its Direction is taken, a stub locale on PATH that answers charmap with GB18030 (and UTF-8) holds the branch, through both files, with a name of one of the 32 hanzi placed under the first and refused under the second. For the second line, if a rule is taken: cases beside #804's C1_BIN_DIRS (the lone byte refused), and NOT_CONTROLS gaining U+011B and a name that holds U+2019 (UTF-8 0xE2 0x80 0x99) to hold the other side, under C and C.UTF-8, through both files; one mutant per byte of the rule, each caught. No macOS or Windows run.
Overlaps. #804 and #841 are the only open branches that edit install.sh, openRepoShape, tests/test_install_sh.py and tests/test_openreposhape_command.py, so this lands after both. install.sh is a release asset and openRepoShape is the launcher: neither is a pinned shape copy, so no upstream-changed row follows. No README, handbook or docs/cli.md sentence names these bytes.
Parent: #461.
Milestone: v1.1.1. Both need a directory name the person set in their own environment: the first refuses a name that is fine in a locale nobody here has, and fails closed; the second places a raw byte that only an 8-bit terminal acts on. Neither is a regression, and neither blocks v1.1.0.
🤖 Generated with Claude Code
Activity
brettheap commentedon Oct 18, 2026
CLAIMED — lane openRepoShape-2, session 81650e29-c906-4fe8-96c9-55580bfe0c44@Eagle, 2026-10-18T00:52:52Z, for #858
Logged in
lanes/log/openRepoShape-2.mdatf3add7279c38791f542a6482bccb2c625de39e7a.The three reads (lane-collision-protocol Rule 1):
install.sh and openRepoShape: the locale's reading of `$OPENREPOSHAPE…
tests: an `iconv` that prints the whole reading of a `$OPENREPOSHAPE_…
brettheap commentedon Oct 18, 2026
(lane openRepoShape-2, 2026-10-18T05:06:14Z) #867 (
5c54af2) closes #858. Line 2, a lone0x9Bbyte, is left as a known limit; the Goal asks for that to be said here.$OPENREPOSHAPE_BIN_DIRthe bytes refuse is now read again in the locale's own charset, bylocale_readingininstall.shandopenRepoShape.0xC2 0x80to0xC2 0x9Fis placed.$OPENREPOSHAPE_BIN_DIRholding a control character before they name it, and install.sh refuses a:before its fetch, so a carriage return or an escape is no longer echoed as typed (#760) #804's and install.sh and openRepoShape: a$OPENREPOSHAPE_BIN_DIRholding a bidi override, U+200B, U+2028 or U+FEFF passes #804's control-character check and is echoed as typed, so the PATH note can show a directory as another #837's words.0x9B, or any lone byte from0x80to0x9F, is placed, as before.0x9B. Only a terminal in an 8-bit charset with C1 controls (ISO 8859) does.$OPENREPOSHAPE_BIN_DIRthe bytes refuse is read again in the locale's own charset, so a GB18030, GBK or Shift_JIS name that holds no control character and nothing drawn as another is placed, and where nothing can read it the bytes decide as before #867's body say so.a<0x9B>b, at the cost of alocalecall for every such name. Lane 2 files no issue without Brett Heap's word.$OPENREPOSHAPE_BIN_DIRthe bytes refuse is read again in the locale's own charset, so a GB18030, GBK or Shift_JIS name that holds no control character and nothing drawn as another is placed, and where nothing can read it the bytes decide as before #867's body says: a name holding one of CP932's or Big5's duplicate codes is refused as the bytes say, as before (rv858's NIT 8).Lane: openreposhape-2 (openRepoShape-2)
Merge main's squash 5c54af2 of #867 (#858) as the stacked base of #874:…