我正在尝试呈现一些 Unicode 形式的阿拉伯语文本。
我已经尝试使用 Text 组件来渲染它,例如
const arabic = "سُبْحَانَ اللهِ وَبِحَمْدِهِ"
render(){
return(
<Text>
{arabic}
</Text>
)
}
Run Code Online (Sandbox Code Playgroud)
它按原样呈现 Unicode,但以这种方式编写
render(){
return(
<Text>
سُبْحَانَ
#1575;للهِ
وَبِحَمْدِ
هِ
</Text>
)
}
Run Code Online (Sandbox Code Playgroud)
呈现正确的输出