Re: characterset declaration

Discussion in 'HTML' started by picayunish, Aug 10, 2003.

  1. picayunish

    picayunish Guest

    When Toby A Inkster was making a web page, a :-? appears and wrote:
    > picayunish wrote:
    >
    >> AddType 'application/xhtml+xml; charset=iso-8859-1' php

    >
    > Better:
    >
    > AddType application/xhtml+xml .php
    > AddCharset ISO-8859-1 .php


    Thanx Toby.
    I did changed it and add .phtml .php3 .html after .php

    >> Page with the charset:
    >> http://www.semi-conductor.nl/

    >
    > For this page the only time you mention the charset is as a <meta/>
    > element. It is not in the HTTP header. In XHTML, you should specify the
    > charset in the XML prolog -- not by a meta tag.


    You mean like as a php function:
    <?php echo '<?xml version="1.0" encoding="iso-8859-1"?>' ."\n"; ?>
    --
    Edwin van der Vaart (Geen familie van....)
    http://www.semi-conductors.nl/ PHP Redirect to semi-conductor.nl
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://members.chello.nl/e.vandervaart/ Experimental site
    http://host.deluxnetwork.com/~evdvaart/ Experimental PHP site
     
    picayunish, Aug 10, 2003
    #1
    1. Advertising

  2. picayunish wrote:

    > Toby A Inkster wrote:
    >
    >> For this page the only time you mention the charset is as a <meta/>
    >> element. It is not in the HTTP header. In XHTML, you should specify the
    >> charset in the XML prolog -- not by a meta tag.

    >
    > You mean like as a php function:
    > <?php echo '<?xml version="1.0" encoding="iso-8859-1"?>' ."\n"; ?>


    That's the one. In general, for XML, XHTML and HTML, the charset should be
    specified in the HTTP header. For XHTML and XML, it should also be
    specified with a prolog as per your example:

    <?xml version="1.0" encoding="iso-8859-1"?>

    And for HTML it should be specified in a <meta> tag. (You can also use a
    <meta/> tag in XHTML, although this is entirely unneeded)

    --
    Toby A Inkster BSc (Hons) ARCS | mailto: | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:
    http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
    playing://(nothing)
     
    Toby A Inkster, Aug 10, 2003
    #2
    1. Advertising

  3. picayunish

    picayunish Guest

    When Toby A Inkster was making a web page, a :-? appears and wrote:
    > picayunish wrote:
    >
    >> Toby A Inkster wrote:
    >>
    >>> For this page the only time you mention the charset is as a <meta/>
    >>> element. It is not in the HTTP header. In XHTML, you should specify the
    >>> charset in the XML prolog -- not by a meta tag.

    >>
    >> You mean like as a php function:
    >> <?php echo '<?xml version="1.0" encoding="iso-8859-1"?>' ."\n"; ?>

    >
    > That's the one. In general, for XML, XHTML and HTML, the charset should
    > be specified in the HTTP header. For XHTML and XML, it should also be
    > specified with a prolog as per your example:
    >
    > <?xml version="1.0" encoding="iso-8859-1"?>
    >
    > And for HTML it should be specified in a <meta> tag. (You can also use a
    > <meta/> tag in XHTML, although this is entirely unneeded)


    Thanx again for the information Toby.
    I did use the xml encoding and removed the <meta/> in the header section.
    --
    Edwin van der Vaart (Geen familie van....)
    http://www.semi-conductors.nl/ PHP Redirect to semi-conductor.nl
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://members.chello.nl/e.vandervaart/ Experimental site
    http://host.deluxnetwork.com/~evdvaart/ Experimental PHP site
     
    picayunish, Aug 10, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Noah
    Replies:
    5
    Views:
    961
  2. Zsolt
    Replies:
    0
    Views:
    3,281
    Zsolt
    Apr 6, 2004
  3. Alex Vinokur
    Replies:
    4
    Views:
    595
    Jonathan Turkanis
    Apr 5, 2004
  4. Martin Honnen

    Incorrect HttpWebResponse.CharacterSet

    Martin Honnen, Sep 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    1,008
    Leon_Amirreza
    Sep 25, 2006
  5. MRAB
    Replies:
    0
    Views:
    753
Loading...

Share This Page