agentleFS
otavioserraotavioserra/conn2flow/.cursor/skills/c2f-mysql-utf8-emoji-encoding/SKILL.md

c2f-mysql-utf8-emoji-encoding

Skill5 starsChanged 2 months agoMITView on GitHub

LEIA ANTES de salvar textos, posts, JSONs ou strings que possam conter Emojis ou caracteres Unicode especiais no MySQL. Se não ler: o banco rejeita o UPDATE silenciosamente e o registro fica NULL/não persiste.

Files
SKILL.md

JSON seguro para MySQL utf8 de 3 bytes

⚡ Gatilho Obrigatório

  • TRIGGER: Gravar dados textuais ricos, posts de redes sociais, feedbacks de usuários ou JSONs arbitrários em colunas MySQL.
  • SKIP APENAS SE: Colunas estritamente numéricas, booleanas ou slugs ASCII controlados.
  • CONSEQUÊNCIA DE IGNORAR: Falha silenciosa de gravação no MySQL (Incorrect string value), perda irrecuperável de conteúdo digitado pelo usuário e campos persistidos como NULL.

  • Enquanto a conexão usar mysqli_set_charset(..., "utf8"), trate caracteres de 4 bytes como incompatíveis com gravação direta.
  • Codifique payloads JSON com json_encode($dados, JSON_UNESCAPED_SLASHES).
  • Não adicione JSON_UNESCAPED_UNICODE: os escapes \uXXXX mantêm o valor ASCII-safe e json_decode recompõe Unicode/emoji na leitura.
  • Verifique erro/linhas afetadas após INSERT/UPDATE; helpers legados podem falhar silenciosamente.
  • Se a migration existe mas a coluna continua nula, investigue charset antes de concluir que o caminho de persistência não executou.
  • Se o projeto migrar integralmente para utf8mb4, reavalie esta compatibilidade antes de remover o padrão.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.