Skip to content

doctor.sh prints 7 non-ASCII lines, so its report is mojibake on a cp1252 Windows console #405

Closed

Description

@fdaviddpt

Raised twice: receipted as informational by the round-one release audit of v0.22.0..HEAD, then ranked misreports by round two. Carry-forward under the two-round cap: non-blocking. Filing it because a finding two independent audits reached is worth a row on the board rather than a third mention.

Symptom

On a Windows console at cp1252, seven lines of /remember:doctor's report render as mojibake -- in a diagnostic whose whole job is to be read by a human at a broken-store moment.

Location

scripts/doctor.sh: :416, :421, :424, and the _ASSUMED_NOTE verdict lines at :622-623. Seven added echo/printf lines in this delta carry bytes outside [ -~].

Mechanism

These are bash echos, so the UnicodeEncodeError-at-the-print shape does not apply -- the process cannot die here. The cost is cosmetic and bounded: unreadable characters in a report, not a crash.

Reasoned, not observed -- no Windows machine was available to either audit, and not covered: no CI leg renders doctor.sh's stdout through a Windows console.

Note what is not wrong. #367 established the printed-lines-must-be-ASCII rule and scoped it deliberately to scripts/session-start-hook.sh; the round-two control confirmed that file holds -- every non-ASCII byte this delta added to it is in a comment. So this is a rule that was never extended, not a rule that was broken, and doctor.sh grew its non-ASCII printed surface from 20 lines to 25 inside the same delta that established the rule next door.

scripts/post-tool-hook.sh gained 2 of its 3 such lines in the same delta (both new sidecar warnings) and belongs in the same decision.

What would settle it

One decision, once, for the whole scripts/ tree rather than per file: may a script print non-ASCII to a stream at all? #367 answered it for one file and its reasoning does not stop at that file's boundary.

If the answer is no, the mechanical part is small and a guard test can pin it the way tests/test_printed_lines_ascii_367.py already pins one file -- generalising that test is most of the work. If the answer is yes-except-in-diagnostics, say which files are in scope and why, because "the ones somebody remembered" is how this ends up asked a fourth time.

Activity

  1. added
    priority:low
    cohort-2
    on Aug 28, 2026
  2. self-assigned this
    on Aug 28, 2026
  3. added a commit that references this issue on Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cohort-2priority:low

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions