From 41a90c6ba4d9927ece8dab67379e910fa968de76 Mon Sep 17 00:00:00 2001 From: Colby McHenry Date: Wed, 26 Aug 2026 16:23:01 -0500 Subject: [PATCH] fix(ui): keep the viewer's printed copy readable on a legacy Windows console MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'no index' guidance carried a literal em dash and the banner an ellipsis. A Windows console on an OEM codepage decodes raw UTF-8 as mojibake (#168), which is exactly what getGlyphs() exists to avoid — seen on the VM. Guidance now takes its dash from the glyph set; the banner uses a plain '...'. Co-Authored-By: Claude Opus 5 --- src/bin/codegraph.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/codegraph.ts b/src/bin/codegraph.ts index 19cd271..2f5d90c 100644 --- a/src/bin/codegraph.ts +++ b/src/bin/codegraph.ts @@ -1839,7 +1839,9 @@ program function printNoIndexGuidance(projectPath: string): void { error(`No CodeGraph index found for ${projectPath}`); console.error(''); - console.error(' The viewer reads an index that already exists — it never creates one.'); + // getGlyphs() (not a literal em dash): a legacy Windows console decodes raw + // UTF-8 with its OEM codepage and renders one as mojibake (#168). + console.error(` The viewer reads an index that already exists ${getGlyphs().dash} it never creates one.`); console.error(' To index this project:'); console.error(''); console.error(` ${chalk.cyan('codegraph init')}`); @@ -1944,7 +1946,7 @@ ${BROWSER_ENV}=none to never open one. const opened = options.open === false ? false : openBrowser(handle.url); console.log( opened - ? chalk.dim(' Opening your browser… press Ctrl+C to stop.') + ? chalk.dim(' Opening your browser... press Ctrl+C to stop.') : chalk.dim(' Open that URL in a browser. Press Ctrl+C to stop.') ); console.log('');