Priority
P3 — defense in depth; dysflow normally guarantees UTF-8.
Context
Access SaveAsText / VBIDE Export write Windows-1252 (ANSI). dysflow converts everything to UTF-8-no-BOM on export (Convert-AnsiToUtf8NoBom in scripts/dysflow-vba-manager.ps1) and offers a Fix-Encoding action. But codegraph-vba can be pointed at exports produced by other tools, older dysflow runs, or hand-copied modules that are still CP1252 on disk.
Current behavior
Files are read as UTF-8 unconditionally. A CP1252 file with accented identifiers — ubiquitous in Spanish-language Access code (Sub ActualizarSituación, enum member Sí, module headers ' MÓDULO:) — decodes to replacement characters, \p{L} regexes stop matching, and the symbol silently disappears from the graph. A BOM-carrying UTF-8 file additionally corrupts the first line (breaks Attribute VB_Name detection → wrong module name).
Expected behavior
- UTF-8 BOM stripped before extraction.
- When a
.bas/.cls/.form.txt/.report.txt file's bytes are invalid UTF-8, fall back to decoding as Windows-1252 (cheap sniff: TextDecoder('utf-8', { fatal: true }) throws → re-decode as windows-1252, which Node's TextDecoder supports).
- Optionally surface a low-severity
ExtractionError/warning noting the fallback so users learn to normalize.
Implementation sketch
- Locate the single point where VBA-routed file content is read (extraction orchestration / file-read helper) and wrap the decode for VBA-family extensions only — do NOT change decoding for tree-sitter languages.
- BOM strip:
if (text.charCodeAt(0) === 0xFEFF) text = text.slice(1).
- Unit tests with fixture buffers: CP1252 bytes for
Sub Función(), UTF-8-BOM file, plain UTF-8 (unchanged path).
Acceptance criteria
Validation
Re-index C:\Proyectos\dysflow\E2E_testing\src (all UTF-8): zero delta. Corrupt one copy to CP1252 in a temp fixture and verify parity.
Priority
P3 — defense in depth; dysflow normally guarantees UTF-8.
Context
Access
SaveAsText/ VBIDEExportwrite Windows-1252 (ANSI). dysflow converts everything to UTF-8-no-BOM on export (Convert-AnsiToUtf8NoBominscripts/dysflow-vba-manager.ps1) and offers aFix-Encodingaction. But codegraph-vba can be pointed at exports produced by other tools, older dysflow runs, or hand-copied modules that are still CP1252 on disk.Current behavior
Files are read as UTF-8 unconditionally. A CP1252 file with accented identifiers — ubiquitous in Spanish-language Access code (
Sub ActualizarSituación, enum memberSí, module headers' MÓDULO:) — decodes to replacement characters,\p{L}regexes stop matching, and the symbol silently disappears from the graph. A BOM-carrying UTF-8 file additionally corrupts the first line (breaksAttribute VB_Namedetection → wrong module name).Expected behavior
.bas/.cls/.form.txt/.report.txtfile's bytes are invalid UTF-8, fall back to decoding as Windows-1252 (cheap sniff:TextDecoder('utf-8', { fatal: true })throws → re-decode aswindows-1252, which Node'sTextDecodersupports).ExtractionError/warning noting the fallback so users learn to normalize.Implementation sketch
if (text.charCodeAt(0) === 0xFEFF) text = text.slice(1).Sub Función(), UTF-8-BOM file, plain UTF-8 (unchanged path).Acceptance criteria
Attribute VB_Namecorrectly.Validation
Re-index
C:\Proyectos\dysflow\E2E_testing\src(all UTF-8): zero delta. Corrupt one copy to CP1252 in a temp fixture and verify parity.