Skip to content
Back to skills

C2f Mysql Utf8 Emoji Encoding

ASecurity

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.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentsqlgit

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add otavioserra/conn2flow-ai-workspace --skill c2f-mysql-utf8-emoji-encoding --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of C2f Mysql Utf8 Emoji Encoding?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for C2f Mysql Utf8 Emoji Encoding
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/otavioserra-c2f-mysql-utf8-emoji-encoding/badge)](https://www.skillsdirectory.com/skills/otavioserra-c2f-mysql-utf8-emoji-encoding)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: c2f-mysql-utf8-emoji-encoding
description: "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."
user-invocable: false
---

# 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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.