DEV Community

Hannah Clarke
Hannah Clarke

Posted on

Converting Hindi Text Between Unicode and Kruti Dev: A Practical Guide

If you work with Hindi text on the web, you have probably met a frustrating problem: text that looks fine in one place turns into broken characters in another. A common cause is the difference between Unicode and Kruti Dev. Unicode is the standard encoding used by most modern websites and apps, while Kruti Dev is an older font-based encoding that is still used in many documents, forms and printed materials in India. Converting between the two is not just a matter of changing the font. The underlying character codes are different, so the text has to be remapped properly, or the result will be unreadable.

Before you convert anything, it helps to know which encoding your text is actually in. If the text was typed with a Kruti Dev font in an old word processor, or copied from a document that used that font, it is likely in Kruti Dev. If it was typed on a modern phone or website with a Hindi keyboard, it is probably already in Unicode. A quick test is to change the font: if the text changes into symbols or boxes, the encoding and the font are tied together in the old way. Another clue is the source. Government forms, older books and scanned documents often use Kruti Dev, while new websites, emails and social media almost always use Unicode.

When you are ready to convert, paste the original text into a converter, choose the correct direction, and check the output carefully before you use it. Read a few lines of the converted text and look for words that do not make sense, missing vowel signs, or characters in the wrong order. These are signs that the direction was wrong, or that the original text mixed encodings. It is also a good idea to keep a copy of the original text, so you can try again if the first result is not right. For longer documents, convert a short sample first, check it, and only then convert the whole document.

For a step-by-step example, see: Unicode Kruti Dev Converter — guide

A few practical tips have helped me. First, always work on a copy, never on the only version of a document. Second, check names, numbers and dates after conversion, because these are the parts where a small error is most noticeable. Third, if you are publishing the text on a website, use a Unicode font and test the page in a couple of browsers, so you know readers will see it as you intended. With a careful check at each step, converting Hindi text between Unicode and Kruti Dev becomes a routine task rather than a source of surprises.

Top comments (0)