任何人都知道我如何设置 Visual Studio 代码编辑器(Microsoft 编辑器)以便能够在代码中显示阿拉伯语字符串。如图所示,每当我写阿拉伯语字符串时,它都会显示为正方形。

我试着看了一下设置文件,字符集是utf8!我正在使用括号,它可以很好地处理阿拉伯字符串?
我使用了自定义工具栏类,因此我可以将标题向右对齐,并且除了导航后退图标未垂直对齐外,一切正常
这是自定义工具栏类
class RTLToolbar @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : Toolbar(context, attrs, defStyleAttr) {
override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
super.onLayout(changed, l, t, r, b)
val childCount = childCount
for (i in 0 until childCount) {
val view = this.getChildAt(i)
if (view is TextView) {
forceTitleCenter(view,l, r)
break
}
}
}
private fun forceTitleCenter(view: TextView, l: Int, r: Int) {
val top = view.top
val …Run Code Online (Sandbox Code Playgroud)