Skip to converter
MyKrutiDev

Hindi Text Shows Boxes or Question Marks? How to Fix It

Boxes, question marks and English letters look like one problem, but they are three different ones with three different fixes. Find the symptom you have below.

By MyKrutiDev teamUpdated

Open the tool: How to Type Hindi in MS Word

□□□□

Empty boxes where letters should be

Cause: the text is Unicode Hindi, but the font on it has no Devanagari letters.

Fix: choose a Hindi font such as Mangal, Nirmala UI or Noto Sans Devanagari.

????

Question marks or odd accented letters (भ)

Cause: the Hindi was saved or read in the wrong text encoding, and the letters were lost or mangled.

Fix: go back to the original and save it as UTF-8. Question marks cannot be turned back into Hindi.

Hkkjr

English letters like Hkkjr or fgUnh

Cause: the text is Kruti Dev, and the Kruti Dev font is missing.

Fix: install Kruti Dev 010, or convert the text to Unicode.

Three symptoms that look alike and have different causes.

Empty boxes: the font has no Hindi

Boxes (sometimes called "tofu") mean the text is fine - it is real Unicode Hindi - but the font on it has no Devanagari letters. Arial, Calibri and Times New Roman are common culprits. Select the text and choose a Hindi font: Mangal, Nirmala UI, Kokila or Aparajita on Windows, Noto Sans Devanagari anywhere. In Word, set it under Complex scripts in the Font dialog (Ctrl+D) to change a whole document at once.

On very old systems, such as Windows XP without Indic support, Hindi can show as boxes whatever the font. The fix there is to enable complex script support, or to use a newer device.

Question marks: the letters were lost

Question marks mean the Hindi was saved or sent through something that could not hold it - a text file saved in "ANSI" instead of UTF-8, an old database, or a form that strips non-English characters. The Hindi was replaced by ? at that point, and it cannot be recovered from the question marks. Go back to the source, and save or export it as UTF-8: in Notepad, File → Save As → Encoding: UTF-8. In Excel, choose CSV UTF-8.

Strange accented letters: the right bytes read the wrong way

Text like भारत is UTF-8 Hindi being read as a Western encoding. Nothing is lost. Open the file again and choose UTF-8: in Excel, use Data → From Text/CSV and pick 65001: Unicode (UTF-8). In a browser or email program, set the text encoding to UTF-8.

English letters: it is Kruti Dev

Letters like Hkkjr or fgUnh are not an encoding problem at all. The text was typed in the Kruti Dev font, which stores Hindi as English key codes, and the font is missing. Install Kruti Dev 010, or convert the text to Unicode with Kruti Dev to Unicode. Why Kruti Dev shows English letters explains it in full.

In Excel and CSV files

Double-clicking a CSV file makes Excel guess its encoding, and it often guesses wrong for Hindi, giving accented nonsense. Open Excel first, then use Data → From Text/CSV, choose 65001: Unicode (UTF-8) as the file origin, and load. When saving a sheet with Hindi as CSV, choose CSV UTF-8 (Comma delimited), not plain CSV, or the Hindi will become question marks.

For website and form owners

If Hindi entered in your own website or form comes back as question marks, the page or the database is not using UTF-8. The page needs <meta charset="utf-8">, and a MySQL database needs the utf8mb4 character set on its tables and connection. Data already saved as question marks cannot be repaired. Fix the setting and collect it again.

On phones and in apps

Modern Android and iPhone devices show Unicode Hindi out of the box. If Hindi shows as boxes in one app only, that app is using its own font, so update it. If Kruti Dev text reaches a phone, it will always show as English letters, because phones cannot install Kruti Dev - send Unicode instead.

Preventing it

  • Type new Hindi in Unicode, with a Unicode font, as described in how to type Hindi in MS Word.
  • Save text and CSV files as UTF-8.
  • Before a document goes out, open it on another computer or phone and check that the Hindi reads correctly.