Can “�” and “?” Mojibake Be Recovered? Restoring Lost Characters, and How to Spot Text That’s Gone for Good
When garbled Japanese text contains “�” (a black diamond with a question mark), it’s easy to assume it’s beyond saving. In fact, each “�” has usually cost only a single byte, and the encoding’s rules plus the surrounding context often let you infer the original character. Text saved with “?” or “・” in place of characters, or text that’s nothing but “�”, can’t be recovered. This article explains why “�” appears, how the gaps can be inferred, how to tell what’s recoverable, and how to avoid making things worse.
“�” stands in for bytes that couldn’t be read
“�” is the Unicode character U+FFFD (the replacement character). Software displays it when it can’t read some bytes as text. When it meets a byte sequence that breaks the encoding’s rules, it substitutes “�” for the unreadable part and moves on.
You often see it when UTF-8 Japanese is opened as Shift_JIS. In UTF-8, hiragana and kanji take 3 bytes per character, while Shift_JIS reads in 2-byte units, so the boundaries drift out of alignment. Wherever that drift produces a byte pair that doesn’t exist in Shift_JIS, or a single byte is left over at the end, you get “�”. The word 文字化 + ke (“mojibake”) becomes “譁�ュ怜喧縺�”, and 会議 no 資料 (“meeting materials”) becomes “莨夊ュー縺ョ雉�侭”.
How text with “�” can still be filled in
UTF-8 has a fixed shape: the first byte determines how many bytes the character has, and the following bytes fall in the range 80–BF. Tracing garbled text backward reveals how many bytes are missing and where, such as “this character is missing the second of its three bytes”. Candidates can then be narrowed to only the bytes that really do turn into “�” when read as Shift_JIS.
The Mojibake Fixer & Decoder tries the remaining candidates one by one and picks those that make natural Japanese (common kanji and hiragana). Here’s what happened when we tried it. Results containing hiragana are shown in romaji, with an English gloss.
| Garbled text | Result | Filled-in characters | Other candidates (examples) |
|---|---|---|---|
| 莨夊ュー縺ョ雉�侭 | 会議 no 資料 (meeting materials) | 資料 | 賃料, 賄料 |
| 螻ア逕ー螟ェ驛�,譚ア莠ャ驛ス蜊�サ」逕ー蛹コ | 山田太郎,東京都千代田区 (a name and address) | 郎, 千代 | — |
| 譏取律縺ョ莨夊ュー縺ョ雉�侭繧帝√j縺セ縺吶… | Two full sentences: “I’m sending the materials for tomorrow’s meeting. Thank you in advance.” | 資料 and the final 。 | — |
| 譁�ュ怜喧縺� | 文字化 + ta (should be ke) | 文字 and ta | i, ka, su, ke |
As the last example shows, a final character has few clues around it and can come out wrong. Filled-in characters are highlighted in yellow, and tapping one swaps it for another candidate, so reselect any that don’t fit the context. The longer the text, the more clues there are and the better the guesses.
How to spot mojibake that can’t be recovered
Inference works only while most of the garbled text still holds the original bytes. In the following cases the original information is gone, so the text can’t be restored.
- All “?”, as in “?????”: when the text was converted and saved, characters the target encoding couldn’t represent were replaced with “?”. Nothing of the originals remains
- All “�”, as in “������”: common when Shift_JIS or UTF-8 text is read as EUC-JP. Nearly every byte becomes “�”, leaving nothing behind
- Letters alternating with “�”, as in “�e�X�g”: the first of each two bytes is lost and only the second survives (this example was the katakana word for “test”)
- “・” mixed in, as in “譁・ュ怜喧縺・”: software such as Excel displayed “・” in place of “�”, and it was then saved or copied that way. It can’t be told apart from a genuine “・”, so it often can’t be filled in
Characters the tool can’t restore are marked with “〓”. When you see many of them, give up on recovering from the garbled text and get the original file or email, then reopen it in the correct encoding.
Double mojibake and “�”
If already garbled text is saved and then read in yet another encoding, you get mojibake twice over. For example, take “譁�ュ怜喧縺�”, from UTF-8 read as Shift_JIS, save it as UTF-8, and read that as Latin-1. You get “èï¿½ï½æ€œå–§ç¸ºï¿½”.
“�” is what the bytes of “�” saved in UTF-8 (EF BF BD) look like when read as Latin-1, and it’s the telltale sign of double mojibake. The tool tries two rounds of garbling by brute force, so even this example returns to 文字化 + ta, and choosing the right final character from the candidates restores the original. Text garbled three or more times, or replaced by “?” along the way, may not be recoverable.
How to avoid making mojibake worse
- 1
Don’t save over a garbled file
Saving a file while it displays garbled destroys the original bytes behind each “�”. If you notice the problem, close without saving and reopen the file with the encoding specified.
- 2
Keep the original file or email
Make a copy of the original before converting or editing. With the original in hand, you can restore it reliably without inferring anything from the garbled text.
- 3
Paste it exactly as it is, “�” included
When pasting garbled text into the tool, don’t delete the “�” or extract only the readable parts. The positions of the “�” are the clues used to fill the gaps.
To work out which encoding mix-up caused the garbling, see the Mojibake Patterns Chart. If a CSV came out garbled in Excel, follow How to Fix CSV Garbled in Excel to reopen it, and you can read the original characters without inferring any “�”.
FAQ
- What is the “�” in garbled text?
- It’s the Unicode replacement character U+FFFD, displayed where software couldn’t read bytes as text. When a file is opened in the wrong encoding, byte sequences that break the rules are replaced with “�”.
- Can mojibake containing “�” be restored?
- If the “�” came from opening UTF-8 as Shift_JIS, inference can often fill it in, because usually only about one byte per character is missing and UTF-8’s rules narrow down the candidates. Spots with few clues, such as the end of the text, can come out wrong.
- Can characters that turned into “?” be restored?
- No. When the text was converted and saved, characters that couldn’t be represented were replaced with “?”, so nothing of the originals remains. If you have the original file, reopen that in the correct encoding.
- What does “�” mean?
- It’s the bytes of “�” saved in UTF-8 (EF BF BD), read as Latin-1 (Windows-1252). It’s a sign that already garbled text was garbled again, and reversing both rounds can sometimes restore it.
Tools in this article
Related articles
Mojibake Patterns Chart: Identify the Encoding Mix-Up from 縺, ã, ‚, ƒ, and $B
Garbled Japanese like “縺薙s縺ォ縺。縺ッ”, “日本語”, or “‚±‚ñ‚É‚¿‚Í” looks random, but it follows strict rules. The first few characters usually tell you which encoding was mistaken for which. This article lays out the seven most common patterns in a chart with examples, explains why each happens, and shows which ones can be reversed.
Read article →Garbled Email Subjects: Causes and Fixes, and How to Read =?UTF-8?B?, =?ISO-2022-JP?B?, and $B
A Japanese email may arrive with a subject like “=?UTF-8?B?5paH5a2X…?=”, or a body that reads “$BL@F|$N…(B”. What you’re seeing is the standard way of sending Japanese by email, left undecoded. This article explains how =?…?= subjects work, the difference between the B and Q methods, the $B in JIS mail, why email bodies get garbled, and what senders can do about it.
Read article →CSV Garbled in Excel? How to Fix It: UTF-8 With BOM vs Other Encodings
You downloaded a CSV from a web service, double-clicked it, and Excel showed “Café, München” instead of “Café, München”. The CSV isn't broken: Excel simply guessed the wrong character encoding. This guide explains why it happens, how to open the CSV you have now so it reads correctly, how to save so it never happens again (UTF-8 with BOM, or a legacy encoding), and which characters are lost when you convert.
Read article →