为什么“ARABIC LETTER PEH"无法在 Android 3.x 上正确显示? [英] Why 'ARABIC LETTER PEH' is not shown correctly on Android 3.x?

查看:38
本文介绍了为什么“ARABIC LETTER PEH"无法在 Android 3.x 上正确显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Unicode 字符中,阿拉伯字母 PEH初始形式 'ﭘ'0xFB58.当我使用以下代码显示 Unicode 字符时,对于 Android 2.2、2.3 中的每个 Unicode 字符,一切正常.和 4.x 但我有 ARABIC LETTER PEH 'ﭘ'Android 3.x 上的问题,在这种情况下是字符'~' 显示.

In Unicode characters the ARABIC LETTER PEH INITIAL FORM 'ﭘ' is 0xFB58. When I use the following code to show Unicode characters, everything is OK for every Unicode character in Android 2.2, 2.3. and 4.x But I have problem with ARABIC LETTER PEH 'ﭘ' on Android 3.x and in this case character '~' is shown.

Typeface tf = Typeface.createFromAsset(context.getAssets(),"TAHOMA.TTF");

strChars = "";
strChars += (char) 0xFB58;
tvChars.setTypeface(tf);
tvChars.setText(strChars);

我应该提到的是,当我使用setTypeface(tf)

I should mention that The problem is remained when I change the font or ignore using setTypeface(tf)

为什么?

如何在Unicode中找到ARABIC LETTER PEH的代码?

How can I find the code of ARABIC LETTER PEH in Unicode?

请以编程方式将0xFB58 () 和0xFB5E () 与任何字体进行比较.你会发现问题所在.第一个未显示,但第二个显示正确.

Please compare 0xFB58 () and 0xFB5E () with any font programmatically. you will find the problem. the first one is not shown but the second one is shown correctly.

推荐答案

您是否尝试添加自己的字体?

Did you try adding your own fonts?

获取适合您的波斯 TTF 字体文件并使用它,这样您就不会依赖于操作系统.http://twigstechtips.blogspot.com/2012/01/android-how-to-use-true-type-fonts-ttf.html

Get a Persian TTF font file that fits you and use it, this way you won't be OS dependent. http://twigstechtips.blogspot.com/2012/01/android-how-to-use-true-type-fonts-ttf.html

这篇关于为什么“ARABIC LETTER PEH"无法在 Android 3.x 上正确显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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