[linux] Re: charset=utf-8

Hugo van der Kooij hvdkooij op vanderkooij.org
Zo Sep 23 11:40:21 CEST 2007


On Sat, 22 Sep 2007, Wybo Dekker wrote:
> Begrijpt iemand waarom dit:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
> <html>
> <head><meta http-equiv="content-type" content="text/html;
> charset=UTF-8"></head>
> <body>testje: Århus</body>
> </html>
>
> in mijn test-file: http://www.servalys.nl/testje.html
>
> in Firefox het woord Århus laat zien als Ã...rhus ?
> (de source file staat in utf-8)

Omdat je webserver verteld dat de zaak anders in elkaar steekt en je 
ISO-8859-1 als character set gebruikt.

$ telnet www.servalys.nl 80
Trying 212.72.224.12...
Connected to www.servalys.nl (212.72.224.12).
Escape character is '^]'.
GET /testje.html HTTP/1.0
Host: www.servalys.nl

HTTP/1.1 200 OK
Date: Sun, 23 Sep 2007 09:34:05 GMT
Server: Apache
Last-Modified: Sat, 22 Sep 2007 21:28:52 GMT
ETag: "af8226-b8-12e56d00"
Accept-Ranges: bytes
Content-Length: 184
Vary: Accept-Encoding,User-Agent
Expires: Sun, 23 Sep 2007 10:46:53 GMT
Connection: close
Content-Type: text/html; charset=ISO-8859-1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
<html>
<head><meta http-equiv="content-type" content="text/html; 
charset=UTF-8"></head>
<body>testje: Ã…rhus</body>
</html>

Even afgezien dat je text los slingert in de body tags en dat is niet 
gedefineerd. Zorg dus dat het minimaal W3C compliant is voor je gaat 
testen. Anders zijn je test resultate bij voorbaat al onvoorspelbaar.

Hugo.

-- 
 	hvdkooij op vanderkooij.org	http://hugo.vanderkooij.org/
 	    This message is using 100% recycled electrons.

 	Some men see computers as they are and say "Windows"
 	I use computers with Linux and say "Why Windows?"
 	(Thanks JFK, for this quote of George Bernard Shaw.)




More information about the Linux mailing list