Skip to content
Back to skills

C2f Mysql Utf8 Emoji Encoding

ASecurity

READ BEFORE saving text, posts, JSON or strings containing emoji or special Unicode characters in MySQL. Prevents rejected updates and missing persisted values.

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

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-conn2flow-ai-workspace/badge)](https://www.skillsdirectory.com/skills/otavioserra-c2f-mysql-utf8-emoji-encoding-conn2flow-ai-workspace)

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: "READ BEFORE saving text, posts, JSON or strings containing emoji or special Unicode characters in MySQL. Prevents rejected updates and missing persisted values."
user-invocable: false
---

# JSON Safe for 3 bytes MySQL utf8

# ⚡ MANDATORY TRIGGER
- **TRIGGER**: Record rich textual data, social media posts, user feedback or arbitrary JSONs in MySQL columns.
- **SKIP ONLY IF**: Strictly numerical columns, booleans or controlled ASCII slugs.
- **CONSEQUENCE OF IGNORING**: Silent write failure in MySQL (`Incorrect string value`), unrecoverable loss of user-typed content and persisted fields like NULL.

---

- While the connection uses `mysqli_set_charset(..., "utf8")`, treat 4-byte characters as incompatible with direct recording.
- Code JSON payloads with `json_encode($dados, JSON_UNESCAPED_SLASHES)`.
- Do not add `JSON_UNESCAPED_UNICODE`: `\uXXXX` exhausts maintain the ASCII-safe and `json_decode` value restores Unicode/emoji in reading.
- Check error/affected lines after INSERT/UPDATE; legacy helpers can fail silently.
- If migration exists but the column remains null, investigate charset before concluding that the persistence path did not run.
- If project migrates fully to `utf8mb4`, re-evaluate this compatibility before removing the pattern.

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.