What is mojibake?
Mojibake is garbled text that appears when text is saved in one encoding and read in another. Most often, UTF-8 is wrongly read as Windows-1252 or ISO-8859-1. Every byte of a special character then shows up as a character of its own.
Common causes
- The database connection uses
latin1although the data is UTF-8. - The web server sends
charset=ISO-8859-1, but the page is saved as UTF-8. - An email client or newsletter tool declares the wrong encoding.
- Text is copied between programs that expect different encodings.
Double-broken: é
If already broken text is converted wrongly once more, you get double mojibake: é first becomes é, then é. Mojibuster detects these levels too and repairs up to three at once.
For developers: fix the cause
- Set
<meta charset="utf-8">in HTML and send the headerContent-Type: text/html; charset=utf-8. - Use
utf8mb4in MySQL and MariaDB for tables and the connection (SET NAMES utf8mb4). - Save source files as UTF-8 without a BOM.
- Convert text only once – at the boundary between your system and the outside world.
Frequently asked questions
What does the � character mean?
That’s the replacement character U+FFFD. A program inserts it when it couldn’t read a byte. The original character is lost then – Mojibuster tells you how many spots are affected.
Can I convert HTML codes like é too?
Yes. Switch on Also convert HTML codes. Codes like é, é and é are then turned into real characters.
Is my text stored?
No. The repair runs in your browser. The text is neither transferred nor stored.
Does this work with other languages?
Yes. Mojibuster repairs every character that was misread from UTF-8 – for example French accents, German umlauts, emojis or Japanese script.