Results 1 to 4 of 4

Thread: [RESOLVED] Special characters

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Resolved [RESOLVED] Special characters

    What is the right way to present special characters like éè and tabs in XHTML?




    - ØØ -

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Special characters

    Quote 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
    My Blog.

    Ryan Jones.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    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 &eacute;.
    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.

  4. #4

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    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
  •  



Click Here to Expand Forum to Full Width