- Home
- Skills
- Agents & Orchestration
- Repair Unicode & Text Encoding Bugs
More screenshots
Works with the AI tools you already use
Repair Unicode & Text Encoding Bugs
Repair Unicode & Text Encoding Bugs is a bounded ToolForge Labs workflow.
$8.99
Repair Unicode & Text Encoding Bugs
Example session with this skill installed
Fix the issue where emojis in our Postgres DB are turning into question marks when fetched by our Node.js API and sent to a legacy CSV exporter. Our DB is UTF-8.
- Read your context and instructions
- Compiled the repair unicode
- Generated the data export
I have analyzed the data flow from Postgres through the Node.js runtime to your legacy CSV exporter. The issue stems from the CSV export stream defaulting to ascii or latin1 encoding, which cannot represent multi-byte emoji characters, leading to replacement characters (?).
Unicode Repair Strategy
The following patch ensures the Node.js fs.createWriteStream or library equivalent uses the correct encoding and adds a normalization step to prevent drift during the round-trip.
const fs = require('fs');
const { Readable } = require('stream');
// Fix: Explicitly set UTF-8 with BOM for legacy Excel-friendly CSVs
// and ensure NFD normalization if the source data comes from macOS clients
function createLegacyExporter(outputPath) {
// Use UTF-8 with BOM (\ufeff) to force legacy apps (Excel) to recognize encoding
const stream = fs.createWriteStream(outputPath, { encoding: 'utf8' });
stream.write('\ufeff');
return stream;
}
// Deterministic Test Case
function testEmojiPersistence() {
const input = "User_🚀_Report";
const normalized = input.normalize('NFC');
// Verify byte length for UTF-8 (Rocket is 4 bytes)
const buf = Buffer.from(normalized, 'utf8');
if (buf.length !== 15) {
throw new Error(`Encoding mismatch: Expected 15 bytes, got ${buf.length}`);
}
console.log("✓ Unicode invariant check passed: Emojis preserved in buffer.");
}
testEmojiPersistence();
| Component | Current State | Target Invariant | Repair Action |
|---|---|---|---|
| Postgres | UTF-8 | UTF-8 | None required |
| Node.js API | NFD/NFC Mix | NFC (Canonical) | Add .normalize('NFC') on ingress |
| CSV Exporter | Default (Latin1) | UTF-8 + BOM | Explicitly set utf8 and write BOM |
Next steps
- Apply the
.normalize('NFC')call to your database service layer to unify incoming text. - Update the CSV stream configuration to use
utf8instead of the system default. - Run the provided
testEmojiPersistencescript in your CI environment to catch regressions.
repair-unicode-text-encoding-bugs.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Repair Unicode & Text Encoding Bugs is a bounded ToolForge Labs workflow. Diagnose and repair Unicode decoding/encoding, normalization, byte-to-text boundaries, BOMs, replacement characters, line endings, and cross-service text drift. Works from full repositories or partial context such as snippets, logs, configuration, traces, and architecture notes. Produces concrete repair patterns and focused deterministic tests while preserving existing product/security policy. It works from a full repository or partial evidence such as snippets, logs, configuration, traces, tickets, and architecture notes. The skill preserves existing product and security policy, separates verified facts from assumptions, avoids invented execution claims, and produces concrete repair or review steps with focused deterministic validation or traceable evidence.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 27 days ago
- Passed all security checks, Safe to install