What is the difference between this &
and this &
for &(ampersand)? What should be use with utf8 ?
views:
74answers:
3
+5
A:
Both are character references and refer to the same character (AMPERSAND, U+0026). &
is a named or entity character reference and &
is a numerical character reference.
In fact, &
is actually just a substitution for &
(see list of character entities):
<!ENTITY amp CDATA "&" -- ampersand, U+0026 ISOnum -->
Gumbo
2010-01-26 18:59:28
ok thanks but what should be used with utf 8 "entity character reference" or "numerical character reference"?
metal-gear-solid
2010-01-26 19:01:33
@Jitendra: It doesn’t matter. You can use the form you want.
Gumbo
2010-01-26 19:03:01
are both compatible with all browsing devices?
metal-gear-solid
2010-01-26 19:05:26
Jeff Yates
2010-01-26 19:13:23
@Jeff Yates - right and remember-able too
metal-gear-solid
2010-01-26 19:15:57
A:
http://www.xml.com/pub/a/2001/01/31/qanda.html
According to O'Reilly you should be using & in xml. UTF-8 is quite a bit different. http://www.fileformat.info/info/unicode/char/0026/index.htm
Joel Etherton
2010-01-26 18:59:54
A:
No difference. Utf-8 doesn't matter because & is reserved anyway. So use &
Kyle Butt
2010-01-26 18:59:57