显示在Android的UNI code字? [英] Display unicode characters in android?

查看:113
本文介绍了显示在Android的UNI code字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个消息应用程序,并在学习的成员相当一部分不居住在北美或英国。

I've created a messaging app and am learning a good portion of members don't reside in North America or the UK.

当他们发布的消息只是乱码的文本返回。其中,数据存储中的所有数据库列是UTF-8。

When they post messages only garbled text is returned. All database columns where the data is store is in UTF-8.

有没有办法正确显示UTF-8字符,有人已经能够进入?请参见下面的截图。

Is there a way to properly display UTF-8 Characters that someone has been able to enter? See the screenshot below.

推荐答案

简单之一:使用合适的字体

The simple one: use the appropriate font.

更多precisely,端点应该有,如果你想正确地显示它们它定义了UNI code字符的字体。我不知道这是否是可能的机器人,但你应该尝试embbed一个完整的UTF-8的字体与您的应用程序,因为你不知道什么年代由驻留字体定义(Droid的家风可以被供应商和电力用户进行更换)

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).

与第一香草的Droid系列测试(你可以找到它的android.git.kernel.org),找到一个字体家族可再发行组件与您的应用程序,并在应用程序中使用它。我从来没有使用过这一点,但在我看来,这handcent提供型动物字体包(用于look'n'feel但可以肯定的UNI code区)。

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).

雷诺

可以在Android的Git回购发现: - DroidSansArabic.ttf定义阿拉伯语区间(U + 6000-U + 06FF二百五十○分之九十四多) - DroidSansHebrew.ttf定义希伯来文的时间间隔(U + 0590-U + 05FF八十七分之八十七)... ...(核对fontforge)

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)

这篇关于显示在Android的UNI code字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆