中身は sjis なのにサーバーは文字コードを iso-8859-1 を返してますね。 %telnet slash.slashdot.jp 80 Trying 202.221.179.13... Connected to slash.slashdot.jp. Escape character is '^]'. HEAD / HTTP/1.0
HTTP/1.1 301 Moved Permanently Date: Tue, 30 Aug 2011 13:59:11 GMT Server: Apache/1.3.42 (Debian) mod_gzip/1.3.26.1a mod_perl/1.31 Location: http://srad.jp/ Connection: close Content-Type: text/html; charset=iso-8859-1
サーバーの文字コードが間違ってる (スコア:2)
%telnet slash.slashdot.jp 80
Trying 202.221.179.13...
Connected to slash.slashdot.jp.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 301 Moved Permanently
Date: Tue, 30 Aug 2011 13:59:11 GMT
Server: Apache/1.3.42 (Debian) mod_gzip/1.3.26.1a mod_perl/1.31
Location: http://srad.jp/
Connection: close
Content-Type: text/html; charset=iso-8859-1
「へぇ、最近じゃ /.J はみなさん、ヨーロッパ系の言語で投稿するのね。感心だなぁ」と思ったが
wget -O File.txt "h
Re:サーバーの文字コードが間違ってる (スコア:2)
もうちょっと、HTTPの勉強をした方がよいですよ。
> HEAD / HTTP/1.0
Host: slash.slashdot.jp
最近はVirtualHostな場合が多いので、Host:ヘッダは必須かと。
> HTTP/1.1 301 Moved Permanently
> Location: http://srad.jp/ [srad.jp]
あと、これの意味を知っておいた方がよいです。
> Content-Type: text/html; charset=iso-8859-1
試しに、HEADではなくGETしてみたら意味がわかると思いますよ。