I've created a messaging app and am learning a good portion of members don't reside in North America or the UK.
When they post messages only garbled text is returned. All database columns where the data is store is in UTF-8.
Is there a way to properly display UTF-8 Characters that someone has been able to enter? See the screenshot below.
Inserting Unicode characters To insert a Unicode character, type the character code, press ALT, and then press X. For example, to type a dollar symbol ($), type 0024, press ALT, and then press X.
Android UnicodeMap lets you browse Unicode characters by range and search for them by name, display them (when Android has the font) and copy them to the clipboard. It can also decode a string of Unicode characters to names.
Step #1 Copy and paste a text message into the empty box. Characters will automatically be displayed in the results box. Step #2 Identify the different symbols in your SMS message. GSM characters will be displayed in grey, Unicode characters will appear in red and escape characters will be displayed in orange.
The simple one: use the appropriate font.
More precisely, the endpoint should have a font which define the unicode characters if you want to display them properly. I don't know if that is possible for android but you should try to embbed a full utf-8 font with your application since you have no idea on what's defined by the resident font (Droid familiy can be replaced by vendors or power user).
Test with the vanilla Droid family first (you can find it on android.git.kernel.org), find a font family redistributable with your application and use it within your application. I have never used that but it seems to me that handcent provide differents font packs (for look'n'feel but certainly for unicode regions).
Renaud
Can be found on the android git repo: − DroidSansArabic.ttf defining the Arabic interval (U+6000-U+06FF 94/250 and more) − DroidSansHebrew.ttf defining the Hebrew interval (U+0590-U+05FF 87/87) … … (checked with fontforge)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With