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

Enforcing Charset to UTF-32 in HTML using meta tags

P: n/a
I have the following in the XHTML 1.0 Strict page:
<meta http-equiv="Content-Type" content="text/html;charset=utf-32" />

However W3 validator complains that
"The character encoding specified in the HTTP header (utf-8) is
different from the value in the <metaelement (utf-32). I will use
the value from the HTTP header (utf-8) for this validation."

How can I change the encoding in the header? I don't have access to
change the HTTP server configuration.

Problem URL:
http://www.quantumcrypto.de/dante/

W3 Validator Output:
http://validator.w3.org/check?uri=ht....de%2Fdante%2F

Nov 25 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Scripsit do*********@gmail.com:
I have the following in the XHTML 1.0 Strict page:
<meta http-equiv="Content-Type" content="text/html;charset=utf-32" />
Why are you using XHTML, and why are you using utf-32? That's pointless
game on the Web these days: you have nothing to win and almost
everything to lose. Have you any reason to believe that browsers support
utf-32? And IE surely doesn't support XHTML, unless you fake it as
old-style HTML.
However W3 validator complains that
"The character encoding specified in the HTTP header (utf-8) is
different from the value in the <metaelement (utf-32). I will use
the value from the HTTP header (utf-8) for this validation."
That's correct.
How can I change the encoding in the header?
This depends on the server.
I don't have access to
change the HTTP server configuration.
Then you don't. But this does not matter, since you shouldn't anyway.
Problem URL:
http://www.quantumcrypto.de/dante/
A quick look suggests that it only uses ASCII characters, so what would
be the point of using utf-32? It would just multiply the size of the
file by 4 and would make browsers and search engines fail to process it.

If you really want to prepare for the inclusion of non-ASCII characters
directly as data, just use utf-8, if you know how to do that.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Nov 25 '07 #2

P: n/a
On Sun, 25 Nov 2007, do*********@gmail.com wrote:
<meta http-equiv="Content-Type" content="text/html;charset=utf-32" />
If this line is encoded in US-ASCII, it can no longer be UTF-32.
If this line is encoded in UTF-32, you must know this encoding
*in advance* to be able to read the line.

Either way, this <meta http-equivis nonsense. See also
http://www.unics.uni-hannover.de/nht...a-http-equiv.1
http://www.unics.uni-hannover.de/nht...a-http-equiv.2

Perhaps you want UTF-32 to exclude your pages from Google.
There are better ways to do this. (Google still cannot read
UTF-16 and UTF-32.)

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
Nov 26 '07 #3

P: n/a
On Mon, 26 Nov 2007, dk_sz wrote:
>(Google still cannot read UTF-16 and UTF-32.)

Where do you have that information from?
http://www.google.com/search?q=U.T.F.1-6

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
Nov 26 '07 #4

P: n/a
Scripsit dk_sz:
>There are better ways to do this. (Google still cannot read
UTF-16 and UTF-32.)

Where do you have that information from?
Would you believe that Andreas has actually done some tests?
It is quite simple to convert from e.g. UTF-16 to UTF-8.
For some values of "simple", but that does not force anyone to do such
conversions.
However, it is annoying when people specify
different things in meta, BOM and server :-)
I'd say it's just sloppyness. I've seen it happen rather often, and you
specify the actual encoding in the HTTP headers, the odds are that
you'll never notice that you meta tag is in violation of that.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Nov 26 '07 #5

P: n/a
Thank y'all. For now I have switched from UTF 32 to UTF-8

saqib
http://www.quantumcrypto.de/dante/
Nov 28 '07 #6

P: n/a
On Mon, 26 Nov 2007, I wrote:
>>(Google still cannot read UTF-16 and UTF-32.)

Where do you have that information from?

http://www.google.com/search?q=U.T.F.1-6
I noticed that the number of pages found with this search
gets smaller. It seems that Google catches on with UTF-16.

This cached page
http://google.com/search?q=cache:www...e1-utf-16.html
looks OK now.

--
Bugs in Internet Explorer 7
http://www.unics.uni-hannover.de/nhtcapri/ie7-bugs
Nov 30 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.