agentleFS
otavioserraotavioserra/conn2flow-ai-workspace/.claude/skills/c2f-mysql-utf8-emoji-encoding/SKILL.md

c2f-mysql-utf8-emoji-encoding

Skill4 starsChanged 33 days 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.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.