PRELAPS Mojibake Recovery

About

Prelaps (mojibake.prelaps.com) is a small collection of tools for the places where text goes wrong. Every tool runs inside your browser, and none of them send what you enter to a server. What follows describes the first of them, Mojibake Recovery.

What this tool does

It turns unreadable text like ¾È³çÇϼ¼¿ä or 안녕하세요 back into the characters it started as. It covers 12 languages, including Korean, Japanese, Chinese and Russian.

Garbling has a single cause: data stored one way was read another way. So recovery walks the same two steps backwards — the garbled characters are pushed back through the encoding that misread them to restore the original bytes, then read again with the real one. Since there is no way to know which combination is right, all 220 of them are tried and the most natural-looking result is chosen.

Why it was built

The standard library for this kind of repair is ftfy. It targets the ’ family common on the English-language web, and in that area it is close to perfect.

But garbling that involves Korean, Japanese or Chinese encodings is outside its scope. Measured on the same benchmark:

Casenftfy 6.3.1This tool
Misread as a CJK encoding200.0%100%
CJK source text garbled510.0%66.7%
Misread as a Cyrillic encoding3915.4%97.4%
UTF-8 → Western misread (ftfy's focus)3196.8%100%

There is no claim of beating ftfy on its home ground — 31 cases at 100% against 96.8% is effectively a tie, and ftfy is the more sophisticated tool there. The gap is elsewhere: 71 cases involving CJK encodings, where ftfy recovers none. That is the reason this tool exists.

How it is built

Everything runs in your browser. There is no server that receives text, no sign-up, and nothing is stored. Closing the tab discards it all.

Accuracy is measured, not asserted. A benchmark of 148 cases across 12 languages runs on every change to the engine: 84.5% correct on the first candidate, 96.6% within three. These numbers come from that sample and are not a guarantee for every input — see the Terms.