|
-
Jan 26th, 2006, 01:09 PM
#1
[RESOLVED] Special characters
What is the right way to present special characters like éè and tabs in XHTML?
- ØØ -
-
Jan 26th, 2006, 04:59 PM
#2
Re: Special characters
 Originally Posted by NoteMe
What is the right way to present special characters like éè and tabs in XHTML?
- ØØ -
I suppose you could say it depends on the page char set and stuff but the normal HTML entities are normally best too use 
http://www.howtocreate.co.uk/sidehtmlentity.html is a good place to start - if your pageis outputted from PHP you can always use the htmlentities() function to do the work for you 
Cheers,
Ryan Jones
-
Jan 26th, 2006, 05:01 PM
#3
Re: Special characters
Tricky question.
Tabs are best presented as literal tabs, but you need preformatted text (<pre> or whitespace: pre) to make them actually show up.
Special characters ... the XHTML DTD defines the entire set of character entities that HTML has. The problem here lies in the fact that XHTML is an XML language. Pure XML processors might be expected to parse and understand it, not only browsers. Browsers will have those entities built in. Validating XML parsers have to read the XML and thus get all the entities, so they're fine, too. But there are non-validating XML parsers out there, and those don't read DTDs, thus they don't get the entities, thus they can't read things like é.
The only way to satisfy all parsers is thus to use numerical references, i.e. &#abcd;, where abcd is the Unicode code point of the character you want.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 27th, 2006, 03:47 AM
#4
Re: Special characters
Thanks sciguyryan, now that was a nice web page. It is now del.icio.us'ed. I will go with your final words CornedBee, and use sciguyryan page as a reference, since this is mainly a static web page.
PS: Woohooo...I can even write my name on a web page now, and get it right in all browsers..
- ØØ -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|