ADVPL Encoding Manager for Protheus
Ensures safe editing of CP1252-encoded ADVPL source files by managing UTF-8 conversions within the Claude Code environment.
This skill provides a critical workflow for developers working with Totvs Protheus environments, where legacy .prw files often use Windows-1252 (CP1252) encoding. Since Claude Code operates exclusively in UTF-8, direct edits can corrupt accented characters by replacing them with replacement characters. This tool manages a stage-and-commit lifecycle—converting files to UTF-8 for safe AI interaction and reverting them to CP1252 for seamless compilation—preventing data loss and ensuring code integrity across Protheus projects.
Key Features
01Diagnostic reporting for file encoding status across projects
02Lossless CP1252 to UTF-8 conversion for safe Claude editing
0313 GitHub stars
04PowerShell integration for surgical, non-destructive find-and-replace
05Encoding verification to detect mismatches before corruption occurs
06Automated backup creation (.bak) during the staging process
Use Cases
01Automating code refactors in ADVPL projects without manual encoding conversions
02Validating file encodings across a large Totvs codebase before compilation
03Editing legacy Protheus .prw files containing Portuguese or Spanish accents