Can you use character codes in XML?
I referenced this website: http://biega.com/special-char.html to aid me in adding special characters in my XML. But to no avail.
Here is what I am doing:
In my XML I have attempted to add special characters like such:
<inc_1c>
<Url>http://www.google.com</Url>
<Title>This is some content »</Title>
</inc_1c>
When I go to the browser it displays a broken special char symbol: �.
Initially I tried:
<Title>This is some content »</Title>
No dice. Anyone have any suggestions?
**Update: I should probably mention, this XML file is working with an XSL file for styles... Then its being pulled into 开发者_如何学编程an .ASPX page and displayed there.
Consider adding / adjusting the <meta charset="">
, either <meta charset="ISO-8859">
or <meta charset="utf-8">
I cannot reproduce this behavior using Firefox or IE8:
<html>
<body>
»<br>
»<br>
»
</body>
</html>
All three versions work as expected. I suspect your browser may not support Unicode, or the font it's using doesn't have this character in it.
Have you tried using » ?
- 187 is decimal, bb is the same value in hexadecimal (hence the extra x)
- Got this idea from http://unicode.org/reports/tr20/
精彩评论