<string name="home_butttom_show_text">What’s your goods look like…</string> |
android values strings xml quote char
How can I write character ‘ in Android’s strings.xml? – Stack Overflow
Error in strings.xml file in Android – Stack Overflow
另外,好像:
html的
"
按照道理来说,等价于:
'
是双引号
注:
'是单引号
"是双引号
搜:
html single quote
参考:
html – How to escape single quote – Stack Overflow
8.5 Named character references — HTML5
Are single quotes allowed in HTML? – Stack Overflow
html – How to escape double quotes in title attribute – Stack Overflow
【总结】
后来证明:
(1)特殊字符前加上反斜杠\,是可以的:
<string name="home_butttom_show_text">What\’s your goods look like…</string> |
(2)最外层加双引号,表示整体是个字符串,也是可以的:
<string name="home_butttom_show_text”>"What’s your goods look like…"</string> |
(3)'也是可以的:
<string name="home_butttom_show_text”>"What's your goods look like…"</string> |
(4)但是"却不能正常显示。
而且好像是:如果写,就要两个一起写,否则单个双引号和单引号一起写,还会报错。
注:
对于这些HTML实体字符,可参考: