{"uid":"cap_IXbUmSFJAIx-boDfiCM0t","slug":"aiskills402-mojibake-repair-235ade86","name":"AISkills402 Mojibake Repair","description":"Mojibake Repair API: undoes broken encoding (UTF-8 read as Windows-1252, Latin-1 or Windows-1251, once or twice) byte by byte. Deterministic code, no language model: mixed, half-damaged or lost-byte text gets a CANNOT REPAIR verdict instead of a guess (still one paid call). $0.004 USDC per call, no account. POST JSON {input}, up to 60000 chars; free example at https://api.aiskills402.com/v1/run/mojibake-repair/example","url":"https://api.aiskills402.com/v1/run/mojibake-repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","maxLength":60000,"minLength":1,"description":"The garbled text. Up to 60000 characters."},"origin":{"enum":["windows-1251",null],"type":["string","null"],"default":null,"description":"Set to \"windows-1251\" only when the text was written in Windows-1251 (one byte per Cyrillic letter) and read as Windows-1252."},"partial":{"type":"boolean","default":false,"description":"true = in mixed text repair only the groups that reverse cleanly and leave the rest as it is; false = refuse mixed text."}}},"responseSchema":{"type":"json","example":{"ok":true,"skill":"mojibake-repair","engine":"1.0.0","replay":false,"result":{"text":"Café crème","layers":1},"receipt":{"tx":"0x<settlement transaction>","settled":true},"refusal":null,"input_sha256":"<sha256 of the request>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_hLxEXr43fZp4-zN1X4JGJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Deterministically reverses broken character encoding (mojibake) caused by misreading UTF-8 text as Windows-1252, Latin-1, or Windows-1251, byte by byte, without any language model guessing.","exampleAgentPrompt":"This text looks totally garbled — like it was read with the wrong encoding. Can you fix this mojibake: 'CafÃ© crÃ¨me'? It was originally UTF-8 but got read as Windows-1252.","exampleUseCases":[{"title":"Fix garbled scraped webpage text","prompt":"I scraped some French product descriptions and they all look mangled — something like 'CafÃ© crÃ¨me' instead of proper accented letters. Can you repair the encoding on this text: 'CafÃ© crÃ¨me'? It looks like UTF-8 was read as Windows-1252."},{"title":"Repair broken Cyrillic database records","prompt":"I have some Russian text from our old database that got corrupted — it was written in Windows-1251 but read as Windows-1252. Can you fix this mojibake for me: 'ÐšÐ°Ñ„Ðµ'? Set the origin to windows-1251."},{"title":"Partially clean mixed-encoding email body","prompt":"I've got an email body that's mostly fine but has some garbled sections mixed in — can you repair just the broken encoding parts and leave the rest alone? Here's the text: 'Hello! CafÃ© is great. See you soon.' Use partial repair mode."}],"resultDescription":"A JSON object with a 'result' field containing the repaired text and the number of encoding layers unwound (1 or 2). If the text is mixed, half-damaged, or has lost bytes that cannot be cleanly reversed, the 'refusal' field contains a CANNOT REPAIR verdict instead of a guess. Also includes a receipt with the settlement transaction hash and an input SHA-256 for auditability.","failureModes":["Mixed or partially-damaged text returns CANNOT REPAIR verdict (still a paid call) unless partial=true is set","Text with lost bytes that cannot be deterministically reversed returns CANNOT REPAIR","Input exceeding 60000 characters is rejected","Invalid origin value other than null or 'windows-1251' causes a validation error","Payment failure via x402 results in HTTP 402 with no processing"],"whenToPreferThis":"Choose this endpoint when you need deterministic, lossless encoding repair — not AI-guessed reconstruction. It is ideal when you know the encoding mismatch pattern (UTF-8 read as Windows-1252/Latin-1, or Windows-1251 read as Windows-1252) and need a reliable CANNOT REPAIR signal for text that cannot be cleanly reversed, rather than a plausible but potentially wrong guess. Prefer it over LLM-based text cleanup when auditability, reproducibility, and exactness matter more than best-effort restoration of heavily damaged text.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T06:47:33.966Z","isFirstParty":false,"canonicalSlug":"aiskills402-mojibake-repair-235ade86"}