Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: characterset declaration

Reply
Thread Tools

Re: characterset declaration

 
 
picayunish
Guest
Posts: n/a
 
      08-10-2003
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


 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      08-10-2003
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 | private.php?do=newpm&u= | pgp:0x6A2A7D39
aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:
http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
playing://(nothing)
 
Reply With Quote
 
 
 
 
picayunish
Guest
Posts: n/a
 
      08-10-2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: how to decode rtf characterset ? MRAB Python 0 02-01-2010 05:17 PM
Incorrect HttpWebResponse.CharacterSet Martin Honnen ASP .Net 6 09-25-2006 05:31 PM
maxplusII error: a deferred constant declaration without a full declaration is not supported Noah VHDL 5 04-07-2006 02:34 PM
cut'n paste problem with characterset Craig Sutton NZ Computing 6 01-18-2006 05:32 AM
javax.mail.internet.MimeMessage.setSubject problem with characterset (UTF-8) Zsolt Java 0 04-06-2004 09:38 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57