我正在开发一个 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/