android - Android 中的 Unicode 问题

标签 android

我正在开发一个 rss feed 应用程序,其中包含泰米尔语的标题和描述。当我在 textview 中显示标题并在 webview 中显示描述时,它显示方框字符。请帮助我如何解决这个问题。 下面是代码

title.setText(data.title); //textview data.title has the tamil language text
webview.loadDataWithBaseURL("", data.description, "text/html", "utf-8", null);
webview.setWebViewClient(new MyWebViewClient());

提前致谢。

最佳答案

听起来您需要在您的应用程序中包含泰米尔语字体。找到适当许可的 Tamil TrueType 字体并将 .ttf 文件包含在 Assets 文件夹中。您可能还需要在 WebView 中指定特定的字体;见this answer了解详情。

关于android - Android 中的 Unicode 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5939969/

相关文章:

c# - Unity如何序列化和反序列化复杂的嵌套json?

android - 如何在 Kotlin 中使用密封类实现 ViewHolder

android - 如何使用 Picasso 库从 SD 卡加载图像

Android 8 (Oreo) 通知未显示

android - Kotlin - 从键值对的 HashMap 中检索数据

android - 使用 com.example.android.apis.graphics

php - 安卓 API 15 : AsyncTask not running (Android Studio 1. 3.2)

android - 在钛中调整 View 内所有对象的大小

android - 在 Android 中无需 root 访问 ARP 表

java - Android 中 undefined reference native 库