Troubleshooting emoji that turn into boxes or "?" - telling tofu from mojibake
This article takes about 4 minutes to read.
When emoji turn into boxes or "?", whether the characters arrived correctly tells you if it is a font problem on the displaying side (tofu) or a character encoding problem along the way (mojibake).In the 2 situations where an emoji you sent showed up as □ on the other person's screen, or an email that came from a contact form was full of unreadable symbols, the place to fix is completely different.
The conclusion first: it depends on whether the characters that arrived are correct
The causes of emoji not displaying correctly fall broadly into 2 types. One is when the characters arrive correctly, but the font of the device or app displaying them has no glyph for them. This box is called tofu, and its causes and fixes are summarized on the glossary page. The other is mojibake, where characters change because the character encoding was mixed up along the way.
To tell quickly which one it is, open the same text in a different environment.
- On the sender's screen, check whether the emoji looks correct.
- Copy the text you received and paste it into a different app or a different device where other emoji display correctly.
- If it turns back into the correct emoji where you pasted it, the characters arrived safely, and it is a font problem in the environment where you first saw it.
- If it stays the same symbol wherever you paste it, the characters had already changed by the time they arrived, and it is a problem on the sender's side or with a setting along the way.
Narrowing down the cause from how it looks
The rightmost column, "Did the characters arrive?", is the dividing line between the tofu side and the mojibake side.
| How it looks | Example | Cause to suspect first | Did the characters arrive? |
|---|---|---|---|
| 1 white box | □ | The font on the displaying side has no glyph | Arrived |
| Splits into 2 or more emoji | 👩 🦰 | No glyph for the combination joined with ZWJ | Arrived |
| A colored square after the emoji | 👋 🏽 | No glyph for the combination with a skin tone added | Arrived |
| Shown as a black-and-white symbol | ☺ | Drawn with text presentation | Arrived |
| 1 ? | ? | A substitute symbol on the displaying side, or a replacement during saving or conversion | It depends |
| A few unfamiliar symbols | 😀 | UTF-8 bytes were read with a single-byte character encoding | Read the wrong way |
| A ? inside a diamond | � | A sequence of bytes that is not valid in that character encoding was read | Read the wrong way, or partly broken |
| &# followed by digits | 😀 | Sent from a form whose character encoding cannot hold emoji | Changed into a different string |
The top 4 rows are cases where the characters arrived correctly and the displaying side does not have the glyph. Unicode's technical standard for emoji, UTS #51 (revision 31), states that when there is no glyph for a sequence joined with ZWJ, the ZWJ is ignored and the parts are displayed as separate emoji (the Emoji ZWJ Sequences section). It also states that a skin tone modifier on its own is displayed as a color swatch (the Diversity section). If you see the parts side by side, as in 👩 🦰 or 👋 🏽, you can guess that the characters sent are fine and the receiving side does not support that combination. The mechanisms are explained in the glossary entries for ZWJ and skin tone, and switching to the black-and-white display is explained in the entry for variation selector.
The bottom 3 rows are cases where the characters themselves have changed, and changing the font on the displaying side will not fix them.
When it happens on a web page
If only 1 emoji on the page is □, the page arrived correctly, and it is on the side of the fonts of the browser and OS you are viewing it with. Open the same page in a different browser or on a different device and see whether it appears. If even the Japanese text across the whole page has turned into unreadable characters, the character encoding declared for the page and the character encoding it is actually saved in do not match.
If it is still garbled after you fix the meta declaration, suspect the setting in the server's HTTP header, which takes priority over meta. The W3C article "Declaring character encodings in HTML" notes that you can check the setting the server sends with the W3C Internationalization Checker.
Emoji sent from a contact form or similar may also arrive in the form of "&# and digits", such as 😀. The WHATWG Encoding Standard specifies that when an HTML form is submitted in an old character encoding, characters not in that encoding are replaced with the decimal number of their code point wrapped in &# and ; (a numeric character reference). 128512 is 1F600 in hexadecimal, which is the code point of 😀. The same standard strongly recommends using UTF-8, stating that once this happens, the server cannot tell whether the user entered an emoji or typed that string as is. To fix it, set the character encoding of the page with the form to UTF-8.
When it happens in email
Email conveys which character encoding the body was written in through the charset in the Content-Type header. If your email software can show the original form including headers, look at this charset first for an email with garbled emoji.
If the charset is ISO-2022-JP, then according to the standard, emoji cannot be put in the body at the time of sending. ISO-2022-JP is a character encoding defined in RFC 1468 for email and network news on Japanese networks, and it contains only ASCII, the roman characters of JIS X 0201, and the characters of JIS X 0208. None of these includes emoji, so the reliable fix is to have the sender switch the character encoding to UTF-8 and send it again.
If the charset is UTF-8 and the emoji is □ only on the receiving screen, the email arrived correctly, and it is a font problem in the recipient's email software. Check it with the steps in the conclusion section. When automatic emails from a form are full of the 😀 form, the cause is the form's character encoding from the previous section, so changing settings on the email side will not fix it.
When it happens in chat and social media
If it looks correct on your screen and turns into □ or splits into parts only on the other person's screen, the characters arrived, and it is on the tofu side, such as an old font on the other person's device. Emoji with a skin tone or hair color added are combinations of parts, so even if the base emoji shows up, only the combined glyph may fail to appear.
When you cannot change the other person's environment, switching to the base emoji that does not use a combination, or adding words before or after the emoji, gets the meaning across even if the glyph splits. If it is ? on both your screen and the other person's screen, the emoji may have been lost while the post was being saved, rather than this being a display problem. In this case, it cannot be fixed on the receiving side, so contact the service about it as a bug on their side.
When it happens in file names
Emoji in file names get garbled when the side that wrote the bytes of the name and the side that read them use different character encodings. For example, when handing files over bundled in a ZIP, the ZIP specification (PKWARE's APPNOTE) specifies that if bit 11 of the per-file flags (Language encoding flag) is set, the file name and comment must be written in UTF-8. Section 4.6.9 of the same specification recommends using this flag only when the original character encoding is already UTF-8. According to Appendix D, when the flag is absent, the name in principle follows the original ZIP character encoding (IBM code page 437), so in a ZIP without the flag, the name is not necessarily UTF-8.
If the extracted file names are garbled entirely, including the Japanese parts, the software used to bundle them and the software used to extract them read the names differently. Bundle them again with software that can write names in UTF-8, or use extraction software that lets you choose the character encoding. If only the 1 emoji character in a file name is □ and the rest of the Japanese is readable, the name is correct, and it is on the side of the font of the screen showing the file list. For files you want to hand over regardless of the other person's OS, it is safe not to use emoji in their names.
When it happens in printing and PDF
If it looks correct on screen and the emoji becomes □ only on printed paper or in an exported PDF, the characters in the original document are fine. It is likely that the font used for printing or exporting to PDF has no glyph for it.
Try printing the same document from a different program, and if some programs show it and others don't, it is a difference in fonts on the software side. To fix it, assign a font that has emoji glyphs to the emoji in the document again, or replace emoji that just won't appear with words.
Common mistakes
- ❌ "If you switch the character encoding on the receiving side, you can always read it" → ✅ Emoji that were replaced with ? along the way cannot be restored
Related terms and articles
- Tofu - the causes of the box that appears when a font has no glyph, and how to fix it
- UTF-8 - the encoding scheme for carrying emoji correctly
- ZWJ - how combined emoji split into their parts
- How emoji characters are counted - how many characters a single emoji counts as
Was this article helpful?