delphi-encoding
Skill87 starsChanged 5 months agoMITView on GitHub
Especialista em encoding de arquivos Delphi. Auto-ativa quando detectar arquivos .pas/.dfm/.dpr/.dpk/.inc/.fmx, problemas de encoding, BOM, acentos quebrados, mojibake, ou menções a "encoding", "UTF-8", "BOM", "ANSI", "acentos", "ç", "ã".
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- delphi-acbrSkill
- delphi-asyncSkill
- delphi-buildSkill
- delphi-claudeignoreSkill
- delphi-e2eSkill
- delphi-firedacSkill
- delphi-fmxSkill
- delphi-laudoSkill
- delphi-legacySkill
- delphi-specSkill
- delphi-spring4dSkill
- delphi-standardsSkill
- delphi-testsSkill
- delphi-writeSkill
The file
Files
Delphi Encoding
Idioma de saída
Detecte o idioma da primeira mensagem. Padrão: pt-BR. Respeite overrides explícitos ("responda em inglês" / "respond in English").
Regra fundamental
Todo arquivo Delphi deve ser salvo em UTF-8 com BOM.
O hook PostToolUse do plugin injeta o BOM automaticamente ao gravar
.pas/.dfm/.dpr/.dpk/.inc/.fmx. Mas se o hook não estiver ativo, ou para
arquivos existentes sem BOM, use o procedimento abaixo.
Referência completa
Consulte knowledge/core/encoding-utf8-bom.md para:
- Diagnóstico de mojibake
- Como verificar e corrigir BOM em arquivos existentes
{$CODEPAGE UTF8}para forçar encoding em units específicas- Encoding em
TStringList.LoadFromFile/SaveToFile - Projetos pré-XE2 que precisam de ANSI/CP1252
Checklist ao criar/editar arquivo Delphi
- Arquivo novo → BOM já injetado automaticamente pelo hook
- Arquivo antigo sem BOM → adicionar BOM antes de commitar
TStringList.LoadFromFile→ sempre passarTEncoding.UTF8como segundo parâmetro- String literal com acento → não use
#NNN— use o caractere diretamente (UTF-8)
Anti-padrão comum
// PROIBIDO — concatenação de caracteres especiais
LMsg := 'Op' + #231 + #227 + 'o selecionada';
// CORRETO — UTF-8 direto (com BOM no arquivo)
LMsg := 'Opção selecionada';Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

