More screenshots

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    Repair Unicode & Text Encoding Bugs

    1

    Repair Unicode & Text Encoding Bugs is a bounded ToolForge Labs workflow.

    $8.99

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Unicode & Text Encoding Bugs

    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();
    
    ComponentCurrent StateTarget InvariantRepair Action
    PostgresUTF-8UTF-8None required
    Node.js APINFD/NFC MixNFC (Canonical)Add .normalize('NFC') on ingress
    CSV ExporterDefault (Latin1)UTF-8 + BOMExplicitly set utf8 and write BOM

    Next steps

    1. Apply the .normalize('NFC') call to your database service layer to unify incoming text.
    2. Update the CSV stream configuration to use utf8 instead of the system default.
    3. Run the provided testEmojiPersistence script in your CI environment to catch regressions.

    repair-unicode-text-encoding-bugs.csv

    CSV · data export

    Generated

    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

    Fix garbled characters in API responses and database migrations.Resolve normalization mismatches in user identifiers and search queries.Repair broken line endings and BOM handling in legacy file parsers.Implement deterministic byte-to-text boundary tests for multi-byte strings.

    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.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

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

    Listed27 days ago

    What's inside

    Frequently Asked Questions