By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,965 Members | 1,702 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,965 IT Pros & Developers. It's quick & easy.

DOCTYPE

P: n/a
here's what I'm using for my PHP files:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1) Is that standard, and the only way it should be?

2) with that meta tag declaring utf-8, is it imperative that my
MySQL tables also use utf-8? (I have them at latin 1 now.)
Feb 27 '08 #1
Share this Question
Share on Google+
23 Replies


P: n/a
Jerry Stuckle wrote:
>>
I also just noticed that Dream Weaver doesn't even offer Latin 1 as an
option for the default encoding - so maybe it is DW that is wacky.
On further checking, DW offers "Western European" as an option,
and if I choose that then ISO-8859-1 is what actually gets
inserted into the (mostly useless) meta-tag. So that makes 3
synonyms for the same charset.

Also, after thinking a bit, the fact that the output originates
dynamically as php shouldn't matter, right? If I were to download
my php page, save the source as *.html, and then publish that
file as *.html, then the end result is the same - as far as
DOCTYPE goes.

So this was really an HTML question, independent of whether that
the output originated as php.
Feb 28 '08 #2

P: n/a
Just because the validator doesn't catch all errors doesn't mean you
These are NOT errors but valid SGML. They are just not valid XML in
contrast to the part of HTML that is widely known.
Feb 28 '08 #3

P: n/a
Only if you use a schema validator. The W3 validator is SGML-based,
which is not appropriate for validating X(HT)ML.
No. But it is appropriate to validate HTML. Because HTML is SGML.
Thats what I said: HTML supports much more than you want to use. But if
you want to use a subset, use the official one, that is based on XML: XHTML.
Feb 28 '08 #4

P: n/a
Jonas Werres wrote:
>Just because the validator doesn't catch all errors doesn't mean you
These are NOT errors but valid SGML. They are just not valid XML in
contrast to the part of HTML that is widely known.
If they're not errors, then what's the problem?

And browsers do understand that a lot better than they do XHTML.

But you also ignore the rest of my points. How convenient.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 28 '08 #5

P: n/a
If they're not errors, then what's the problem?
The problem is the one I mentionend before and you asked for: Nobody
will write that on purpose.
And browsers do understand that a lot better than they do XHTML.
Do you have an example? The only issue I know is the MIME-type thing
with IE.
But you also ignore the rest of my points. How convenient.
Ok, what was there? The W3C. Yes, I ignored that. After a look into the
source of http://www.w3.org/.
Feb 28 '08 #6

P: n/a
Jonas Werres wrote:
>Only if you use a schema validator. The W3 validator is SGML-based,
which is not appropriate for validating X(HT)ML.
do online validators sell/give URLs to google, etc?
Feb 28 '08 #7

P: n/a
Jonas Werres wrote:
>If they're not errors, then what's the problem?
The problem is the one I mentionend before and you asked for: Nobody
will write that on purpose.
>And browsers do understand that a lot better than they do XHTML.
Do you have an example? The only issue I know is the MIME-type thing
with IE.
Google for xhmtl and "internet explorer". You'll find all kinds of
stuff about it.
>But you also ignore the rest of my points. How convenient.
Ok, what was there? The W3C. Yes, I ignored that. After a look into the
source of http://www.w3.org/.
So? They're the ones setting the recommendations. That's what most of
the rest of us follow - including the browser developers. And if they
say XHTML isn't going anywhere soon, browser developers won't be
spending a lot of time supporting it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 28 '08 #8

P: n/a
Jerry schrieb:
Jonas Werres wrote:
>>Only if you use a schema validator. The W3 validator is SGML-based,
which is not appropriate for validating X(HT)ML.

do online validators sell/give URLs to google, etc?
No idea, but I don't think, the W3C one does that.
Why do you ask?
Feb 28 '08 #9

P: n/a
So? They're the ones setting the recommendations. That's what most of
the rest of us follow - including the browser developers. And if they
say XHTML isn't going anywhere soon, browser developers won't be
spending a lot of time supporting it.
Did you have a look at their website?
Feb 28 '08 #10

P: n/a
Jerry Stuckle wrote:
>
What can you say when even W3C doesn't recommend it?
I would be very interested in where the W3C says that - I haven't been
able to find anything like that. Most of the info I'm able to find seems
to point the other way - such as:
http://www.webstandards.org/learn/ar...skw3c/oct2003/
Of course, that's over 4 years old - and that's also the case with the
info that I find...
Feb 29 '08 #11

P: n/a
Jonas Werres wrote:
>So? They're the ones setting the recommendations. That's what most
of the rest of us follow - including the browser developers. And if
they say XHTML isn't going anywhere soon, browser developers won't be
spending a lot of time supporting it.

Did you have a look at their website?
Sure. I go there regularly. So what?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 29 '08 #12

P: n/a
Tony wrote:
Jerry Stuckle wrote:
>>
What can you say when even W3C doesn't recommend it?

I would be very interested in where the W3C says that - I haven't been
able to find anything like that. Most of the info I'm able to find seems
to point the other way - such as:
http://www.webstandards.org/learn/ar...skw3c/oct2003/
Of course, that's over 4 years old - and that's also the case with the
info that I find...
That's right - it's over 4 years old. Check the www.w3c.org site. I
don't have the link handy, but they are now pushing towards HTML 5.0
instead of a new version of XHTML.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 29 '08 #13

P: n/a
Sure. I go there regularly. So what?
>
It is XHTML? So obviously at least they do not recommend NOT to use it.
Feb 29 '08 #14

P: n/a
That's right - it's over 4 years old. Check the www.w3c.org site. I
don't have the link handy, but they are now pushing towards HTML 5.0
instead of a new version of XHTML.
Yeah ... HTML 5... Already had a look at THAT?
Feb 29 '08 #15

P: n/a
..oO(Dikkie Dik)
>By the way, if you want a nice introduction on the matter, here's a good
start:

http://www.joelonsoftware.com/articles/Unicode.html

... and beware of onions ;) There is one thing I strongly disagree with
the above site: the remark that character encodings would be easy. They
are not. Especially if you take some quirky behaviours of Windows and
MySQL into account.
IMHO it _can_ be easy - you just have to do it consistently.
With UTF-8 you have to make sure that

* your data is stored as UTF-8 in the DB
* correctly transfered to your script (SET NAMES utf8)
* correctly transfered to the browser (header())

In short: UTF-8 all the way from the source to the reader.

Micha
Feb 29 '08 #16

P: n/a
Jonas Werres wrote:
>Sure. I go there regularly. So what?
It is XHTML? So obviously at least they do not recommend NOT to use it.
What does that prove?. They just haven't rewritten their website since
it became obvious XHTML isn't going anywhere.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 29 '08 #17

P: n/a
Jonas Werres wrote:
>That's right - it's over 4 years old. Check the www.w3c.org site. I
don't have the link handy, but they are now pushing towards HTML 5.0
instead of a new version of XHTML.

Yeah ... HTML 5... Already had a look at THAT?
Just preliminary specs is all. Looks ok to me.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 29 '08 #18

P: n/a
Jerry Stuckle wrote:
Tony wrote:
>Jerry Stuckle wrote:
>>>
What can you say when even W3C doesn't recommend it?

I would be very interested in where the W3C says that - I haven't been
able to find anything like that. Most of the info I'm able to find
seems to point the other way - such as:
http://www.webstandards.org/learn/ar...skw3c/oct2003/
Of course, that's over 4 years old - and that's also the case with the
info that I find...

That's right - it's over 4 years old. Check the www.w3c.org site. I
don't have the link handy, but they are now pushing towards HTML 5.0
instead of a new version of XHTML.
I did check out that site, quite a bit. I found nothing about them
recommending HTML over XHTML, or even suggesting that you don't use
XHTML. According to everything I read they are concurrently developing a
new XHTML specification as well as HTML 5.

I am willing to accept evidence to the contrary, but without evidence, I
can't accept that the W3C does not recommend XHTML.

I was really hoping you had that link - it would have helped me in
certain discussions I have been having at work.
Mar 1 '08 #19

P: n/a
Tony wrote:
Jerry Stuckle wrote:
>Tony wrote:
>>Jerry Stuckle wrote:

What can you say when even W3C doesn't recommend it?
I would be very interested in where the W3C says that - I haven't
been able to find anything like that. Most of the info I'm able to
find seems to point the other way - such as:
http://www.webstandards.org/learn/ar...skw3c/oct2003/
Of course, that's over 4 years old - and that's also the case with
the info that I find...

That's right - it's over 4 years old. Check the www.w3c.org site. I
don't have the link handy, but they are now pushing towards HTML 5.0
instead of a new version of XHTML.

I did check out that site, quite a bit. I found nothing about them
recommending HTML over XHTML, or even suggesting that you don't use
XHTML. According to everything I read they are concurrently developing a
new XHTML specification as well as HTML 5.

I am willing to accept evidence to the contrary, but without evidence, I
can't accept that the W3C does not recommend XHTML.

I was really hoping you had that link - it would have helped me in
certain discussions I have been having at work.
Quite frankly, I don't give a damn about your discussions at work.

I'll look up the link sometime when I have the time. Right now I'm too
busy to do your work for you.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Mar 1 '08 #20

P: n/a
Jerry Stuckle wrote:
Tony wrote:
>I was really hoping you had that link - it would have helped me in
certain discussions I have been having at work.

Quite frankly, I don't give a damn about your discussions at work.

I'll look up the link sometime when I have the time. Right now I'm too
busy to do your work for you.
A bit touchy, aren't we?

I was trying to point out that I wasn't challenging you. Instead I was
hoping you were right, and had ready information to back up your claim.
It appears that you don't.

I have been researching the XHTML vs HTMML debate for quite some time,
and I have never found a definitive statement by an organization like
W3C such as you claim they made.

Your response, honestly, leaves me questioning your credibility on this
claim. And it gives me a better understanding of how you seem to have
developed such a following as nully & crowd. I've tried to keep our
discussions reasonably friendly - apparently that doesn't work both ways.
Mar 1 '08 #21

P: n/a
Tony wrote:
Jerry Stuckle wrote:
>Tony wrote:
>>I was really hoping you had that link - it would have helped me in
certain discussions I have been having at work.

Quite frankly, I don't give a damn about your discussions at work.

I'll look up the link sometime when I have the time. Right now I'm
too busy to do your work for you.

A bit touchy, aren't we?

I was trying to point out that I wasn't challenging you. Instead I was
hoping you were right, and had ready information to back up your claim.
It appears that you don't.

I have been researching the XHTML vs HTMML debate for quite some time,
and I have never found a definitive statement by an organization like
W3C such as you claim they made.

Your response, honestly, leaves me questioning your credibility on this
claim. And it gives me a better understanding of how you seem to have
developed such a following as nully & crowd. I've tried to keep our
discussions reasonably friendly - apparently that doesn't work both ways.
No, I'm just getting tired of the argument. You can google as well as I
can, and you can find the problems with using XHTML and browsers such as
IE as well as I can.

Go ahead and use XHTML if you want. You'll lose customers because their
browsers don't display it correctly, but who cares? I sure don't.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Mar 1 '08 #22

P: n/a
Jerry Stuckle wrote:
Tony wrote:
>
No, I'm just getting tired of the argument. You can google as well as I
can, and you can find the problems with using XHTML and browsers such as
IE as well as I can.
I have done this. I have seen plenty of discussion on the matter. I have
not seen a statement by the W3C such as you claimed they made. I am
specifically addressing that claim.
Mar 1 '08 #23

P: n/a
Tony wrote:
Jerry Stuckle wrote:
>Tony wrote:
>>
No, I'm just getting tired of the argument. You can google as well as
I can, and you can find the problems with using XHTML and browsers
such as IE as well as I can.

I have done this. I have seen plenty of discussion on the matter. I have
not seen a statement by the W3C such as you claimed they made. I am
specifically addressing that claim.
No, you continue to argue with the answers. And I'm not engaging any
longer.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Mar 2 '08 #24

This discussion thread is closed

Replies have been disabled for this discussion.