Character entitities?

For quick answers to quick questions on whatever subject you need!

Moderator: Thought Police

Locked
Kajun
World Controller
World Controller
Posts: 10412
Joined: Tue Jan 22, 2002 12:00 am
Location: Hear.
Contact:

Character entitities?

Post by Kajun »

Is it advisable, necessary, or not, to replace all symbols with the appropriate entity? I'm thinking particularly of quotation marks - all ampersands have been adjusted, naturally, and obscure characters like & but everything else... do we really need to go for & and –?

edit: :roll: copyright symbol is obscrue, and the two at the end were em and en dashes...
Kajun is awaiting approval.
shtum
Delta (Bokanovsky)
Delta (Bokanovsky)
Posts: 167
Joined: Tue Sep 03, 2002 5:36 pm

Post by shtum »

so this q&a section is just an excuse for you to ask a few computer related questions then? :wink:

in my personal opinion, definately always use & > and < and then the others at your own preference. depending on the parser and on which character set you choose, an xml validator might have problems with stuff like á and æ or it might not. either way it shouldn't affect the display of xhtml pages in a browser (although it might bring about some issues if you try to reform the page using xslt, im not sure).
really, when you're talking about making web pages, i think it depends how geeky you want to be
Kajun
World Controller
World Controller
Posts: 10412
Joined: Tue Jan 22, 2002 12:00 am
Location: Hear.
Contact:

Post by Kajun »

shtum wrote:so this q&a section is just an excuse for you to ask a few computer related questions then? :wink:
Hey, there's an idea! ;)
in my personal opinion, definately always use & & and & and then the others at your own preference. depending on the parser and on which character set you choose, an xml validator might have problems with stuff like á and æ or it might not. either way it shouldn't affect the display of xhtml pages in a browser (although it might bring about some issues if you try to reform the page using xslt, im not sure).
really, when you're talking about making web pages, i think it depends how geeky you want to be
It just seems a little confused. I concede that it's more than just a language issue because of keyboard layouts etc. and while generally the OS will handle that, there could be times where it doesn't apply. But essentially you could end up running semi-colons through entities... and then eventually converting characters into their ASCII codes of whatever... which is to say, to what end?
Kajun is awaiting approval.
heavy-rotation
Thought Police
Thought Police
Posts: 1205
Joined: Thu Mar 14, 2002 12:11 pm
Location: Macclesfield
Contact:

Post by heavy-rotation »

Just quick note on this, something I've noticed since I started using XML and that more.

The program I use for xml/xsd inputs ('xmlspy') entities just as 'normal' characters excepet in a few occasions (ampersand, greater than and less than). They aren't quite normal though, as homesite shows them like this:

–

(should be 3 chars there, an a with a hat, backwards euro sign, and opening double quote, but will probably come out as a  actually)

It seems when you have a XHTML document, and have the correct namespace for the html tag (xmlns="http://www.w3.org/1999/xhtml") you can use these chars.

Pretty useless piece of info unless you have xmlspy though ;)
Kajun
World Controller
World Controller
Posts: 10412
Joined: Tue Jan 22, 2002 12:00 am
Location: Hear.
Contact:

Post by Kajun »

Kajun is awaiting approval.
Locked