Michael Winter wrote:
Where do you think Internet protocols are specified?
Mostly and mainly in the same place where the [window] object is: :-)
it goes per the traditions and per the "templatic" implementation.
Any way, I did some research (damn time zone change, cannot get a
sleep). Sorry I cannot post URL's as I used Perl scripts on one of our
clients' server - they will not like it. Feel free to re-evaluate
yourselve, watch the shebang path as usual.
[ Test 1 ]
#!/usr/bin/perl
print "Content-Type: text/html; charset=iso-8859-1\n\n";
print <<EndOfBlock;
<html>
<head>
<title>Test 1</title>
</head>
<body>
<form method="GET" action="">
<fieldset>
<input type="text" name="test">
<input type="submit">
</fieldset>
</form>
</body>
</html>
EndOfBlock
exit(0);
[ Test 2 ]
#!/usr/bin/perl
print "Content-Type: text/html; charset=iso-8859-1\n\n";
print <<EndOfBlock;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test 1</title>
</head>
<body>
<form method="GET" action="">
<fieldset>
<input type="text" name="test">
<input type="submit">
</fieldset>
</form>
</body>
</html>
EndOfBlock
exit(0);
[ Test 3 ]
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print <<EndOfBlock;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test 1</title>
</head>
<body>
<form method="GET" action="">
<fieldset>
<input type="text" name="test">
<input type="submit">
</fieldset>
</form>
</body>
</html>
EndOfBlock
exit(0);
[Test 1] sets iso-8859-1 charset in the server header
[Test 2] sets iso-8859-1 charset in the server header but UTF-8 in META
tag. Server header is obligated to take priority over meta if UA is not
broken (thus iso-8859-1 remains)
[Test 3] sets UTF-8 in meta.
The variant of charset not set at all is not taken into consideration.
Feel free to break your browser yourselve :-)
In each generated form I typed in the same Russian word which sounds as
"probah" and wich means as I understand "a probe". See the first match
in search results
<http://www.google.com/search?hl=en&q= %D0%BF%D1%80%D0 %BE%D0%B1%D0%B0 &btnG=Google+Se arch>
//////////////
[Test 1] (iso-8859-1 set be server header)
Reported charset by all UA': iso-8859-1
Submission results:
IE 6.0
test=%EF%F0%EE% E1%E0
Firefox 1.5
test=%26%231087 %3B%26%231088%3 B%26%231086%3B% 26%231073%3B%26 %231072%3B
Opera 9.02
test=%26%231087 %3B%26%231088%3 B%26%231086%3B% 26%231073%3B%26 %231072%3B
//////////////
Test 2 (iso-8859-1 set by server header, overrides meta tag)
Reported charset by all UA': iso-8859-1
Submission results (watch the change for IE):
IE 6.0
test=%26%231087 %3B%26%231088%3 B%26%231086%3B% 26%231073%3B%26 %231072%3B
Firefox 1.5
test=%26%231087 %3B%26%231088%3 B%26%231086%3B% 26%231073%3B%26 %231072%3B
Opera 9.02
test=%26%231087 %3B%26%231088%3 B%26%231086%3B% 26%231073%3B%26 %231072%3B
//////////////
Test 3 (UTF-8 set by meta tag)
Reported charset by all UA': UTF-8
Submission results:
IE 6.0
test=%D0%BF%D1% 80%D0%BE%D0%B1% D0%B0
Firefox 1.5
test=%D0%BF%D1% 80%D0%BE%D0%B1% D0%B0
Opera 9.02
test=%D0%BF%D1% 80%D0%BE%D0%B1% D0%B0