Write generated docs as UTF-8 in typer utils docs --output - #1946
Closed
lenamonj wants to merge 1 commit into
Closed
Write generated docs as UTF-8 in typer utils docs --output#1946lenamonj wants to merge 1 commit into
lenamonj wants to merge 1 commit into
Conversation
lenamonj
added a commit
to lenamonj/jeffy-loop
that referenced
this pull request
Aug 31, 2026
The first 3-for-3 wave. CLI11: 1 run, 9 iterations, 3 Mediums, empty-High close in round 1. typer: 1 run, 11 iterations, 2 Highs (hash-seed app selection; unencoded file IO closed as a class) - the encoding fix is upstream as fastapi/typer#1946, closing their open #1881. mimalloc: 3 runs, 28 iterations, 16 findings including a zeroing allocator that returned uninitialized memory, two unlinkable exported symbols, and a pkg-config includedir that built nothing; one High re-scored to Medium mid-run with its derivation published. Corpus 54 -> 57 across 13 languages. All scoreboard markers re-derived; pie re-rendered (Python 13, C++ 4, C 3). validate.sh: 315/315 green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCT5TPf6uidh4Y8AQtMzaJ
svlandeg
reviewed
Aug 31, 2026
svlandeg
left a comment
Member
There was a problem hiding this comment.
Closing, violates user contribution guidelines.
Closes #1881.
1881 is a PR, you don't close a PR with another PR, you review and discuss the first one rather than opening duplicates and exponentially increasing our work load.
Thanks.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1881.
typer <app> utils docs --output FILEwrites the generated Markdown withoutput.write_text(clean_docs), which goes through the platform's default encoding. On interpreters whose locale encoding is not UTF-8 (cp1252 on Windows being the common case), any help text holding a character that encoding cannot represent raisesUnicodeEncodeError- reproduced today on Linux withLC_ALL=C PYTHONUTF8=0against the emoji example from #1881.The fix is the one #1881 asks for: write the file as UTF-8 explicitly, which matches how the docs are meant to be consumed (Markdown tooling assumes UTF-8) and makes the output independent of the machine that generated it.
Includes a regression test that runs
utils docs --outputin a subprocess under a forced ASCII locale and asserts the file is written and round-trips the non-ASCII help text.