android – Hindi character view different on different devices-ThrowExceptions

Exception or error:

I am implementing multi-lingual (French, Chinese, Hindi….etc) functionality. As Hindi language does not support back compability (below 4.0 ICS), I forced localization using Typeface(akshar.ttf). While testing my setup out with Hindi, I came across a critical condition see the image below:

In this string I’m using अब स्क्रीन शुरू करें(Now, I start the screen) and उपयोगी लिंक्स (Useful links)

Supported devices: Samsung ACE, Samsung S Plus, Galaxy 551
enter image description here

Non-supported devices: Samsung Galaxy S2, HTC Nexus One, HTC Incredible S
enter image description here

Any idea why this is happening?

How to solve:

The problem is you cant directly put a hindi font inside where as we need to convert it to unicode and put that. We came up with the same issue and we acheived it by using unicodes instead of fonts.

###

Might be little late to answer, still posting if this helps someone.

Problem is might be with android unicode font rendering.

The easiest way to solve your issue is find an ISO charset based font (if available :), try this http://www.gbpuat.ac.in/hindifonts.htm ) and embed with your app.

Otherwise you need to reorder the unicode characters to get it work. The reordering of characters might be different from device to device.

Hope this helps.

###

You need to put unicode characters everywhere to confirm on all the devices. Here is the site that may help you in finding unicodes

http://unicode-table.com/en/

Leave a Reply

Your email address will not be published. Required fields are marked *