Dipaly farsi text in android webview (for phones not supporting farsi)

前端 未结 2 634
花落未央
花落未央 2021-01-19 12:38

In farsi letters are attach together to form writing scripts. However when I save HTML pages using \"UTF-8\" or \"Windows-1256\" encdoings, and try to display them using web

2条回答
  •  别那么骄傲
    2021-01-19 12:53

    I hit this bug a lot when I was doing keyboards. The problem is that the build in canvas.drawText function in Android didn't support RTL languages. There was a patch for it, but it wasn't part of the default build of Android. So only models going out to those parts of the world that used it tended to have it. Unfortunately I know of no way to test whether it has the patch. And if it doesn't, there's no way to fix it. You could try reversing the text, but then you'd break devices which did have the patch.

    Long story short- there is no way to fix it. However, I'd be shocked if Google hasn't picked up the patch in mainline by now (it existed back in the 2.2 days), so its a shrinking number of phones effected.

提交回复
热议问题