graphify icon indicating copy to clipboard operation
graphify copied to clipboard

Minor Windows/report papercuts: mojibake in manifest paths, stdout encoding, Import Cycles section on doc corpora

Open Ns2384-star opened this issue 4 months ago • 1 comments

Version: graphifyy 0.9.5, Windows 11. Three small independent issues, grouped to avoid noise — happy to split on request.

1. Mojibake in manifest keys and GRAPH_REPORT for accented Windows paths

Accented file paths end up as Confirm�, Expérience in manifest.json keys and GRAPH_REPORT.md. Path encoding should be normalized (UTF-8) at write time. Same class as #904/#1505 (closed) but on the file-path side.

2. query needs manual PYTHONIOENCODING=utf-8 on Windows

Without it, query output crashes/mangles on non-ASCII (cp1252 console). One-liner: sys.stdout.reconfigure(encoding="utf-8") in the CLI entry point.

3. "Import Cycles" report section is meaningless for documentary corpora

On a 76%-documents corpus the section is pure noise. Condition it on the presence of code nodes.

Ns2384-star avatar Jul 04 '26 16:07 Ns2384-star

Thanks for grouping these — all three are addressed as of 54825b6 (on v8, ships in 0.9.7).

  1. Import Cycles on doc corpora — fixed: the section is now emitted only when the graph contains code (code nodes or import edges), so a documents-only corpus no longer shows the noise.

  2. Mojibake in manifest/report and 2. stdout encoding — these are already handled on the current branch (they postdate 0.9.5): manifest.json and GRAPH_REPORT.md are both written with encoding="utf-8", and the CLI main() reconfigures stdout/stderr to UTF-8 with errors="replace" (the #992 fix). If you still see mojibake in the manifest keys on 0.9.7, it would most likely be a viewer opening a UTF-8 file as cp1252 rather than a write-time bug — please reopen with a sample path and we'll dig in.

safishamsi avatar Jul 04 '26 21:07 safishamsi