Summary
ConsoleUi formats numbers and percentages for human display using locale-sensitive defaults (:F1, :N0), so French/German/Italian users see 5,9% and 123 456 while the JSON path explicitly uses InvariantCulture and emits 5.9 and 123456. A user copy-pasting a number from console summary into a follow-up --json consumer (or mixing console and JSON in CI logs) gets inconsistent formatting that can't be reconciled without locale awareness.
Distinct from #1543 (CLI numeric flag parsing not InvariantCulture) — that is the input side; this is the output side.
Where
src/CodeIndex/Cli/ConsoleUi.cs:205 (PrintProgress format strings)
- Various other
:F1 / :N0 / :P format string usages across CLI runners
Suggested approach
(1) Pass CultureInfo.InvariantCulture explicitly to all human-facing format calls in CLI output (the JSON path is already correct). (2) If localization is desired, gate it on a --locale=auto opt-in flag rather than defaulting to system locale. (3) Document the policy ("CLI output uses invariant formatting") in USER_GUIDE.md.
Summary
ConsoleUiformats numbers and percentages for human display using locale-sensitive defaults (:F1,:N0), so French/German/Italian users see5,9%and123 456while the JSON path explicitly usesInvariantCultureand emits5.9and123456. A user copy-pasting a number from console summary into a follow-up--jsonconsumer (or mixing console and JSON in CI logs) gets inconsistent formatting that can't be reconciled without locale awareness.Distinct from #1543 (CLI numeric flag parsing not InvariantCulture) — that is the input side; this is the output side.
Where
src/CodeIndex/Cli/ConsoleUi.cs:205(PrintProgress format strings):F1/:N0/:Pformat string usages across CLI runnersSuggested approach
(1) Pass
CultureInfo.InvariantCultureexplicitly to all human-facing format calls in CLI output (the JSON path is already correct). (2) If localization is desired, gate it on a--locale=autoopt-in flag rather than defaulting to system locale. (3) Document the policy ("CLI output uses invariant formatting") inUSER_GUIDE.md.