[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:22362] Re: apache 文字化け?



At Wed, 10 May 2000 19:21:56 +0900,
Naotaka YAMAMOTO <yamamoto@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hirotaka> At Tue, 9 May 2000 21:42:20 +0900,
> Hirotaka> Ryuichi Arafune <arafune@debian.org> wrote:
> Hirotaka> > 間違いなくそれは"apache の文字化け"なんかではありません。
> Hirotaka> うちでも同じ現象になったんですが(^^;
> Hirotaka> 
> Hirotaka> > N.Y.> View -> Page Info でみると、 iso-8859-1 となっている
> Hirotaka> 
> Hirotaka> /etc/apache/srm.conf の
> Hirotaka> 
> Hirotaka> AddDefaultCharset on 
> Hirotaka> AddDefaultCharsetName iso-8859-1
> Hirotaka> 
> Hirotaka> をコメントにしたら大丈夫でした。
>  コメントアウトしてみましたが、これだけではだめでした。
> どうも、そもそも .html ファイルが iso-8859-1 になってる(?)
> ような感じです。情報ありがとうございました。

http://www.apache.org/docs/mod/core.html#adddefaultcharset

AddDefaultCharset directive

Syntax: AddDefaultCharset Off / On / charset
Context: all
Status: core
Default: AddDefaultCharset Off
Compatibility: AddDefaultCharset is only available in Apache 1.3.12 and later

This directive specifies the name of the character set that will be added to
any response that does not have any parameter on the content type in the HTTP
headers. This will override any character set specified in the body of the
document via a META tag. A setting of AddDefaultCharset Off disables this
functionality. AddDefaultCharset On enables Apache's internal default charset
of iso-8859-1 as required by the directive. You can also specify an alternate
charset to be used; e.g. AddDefaultCharset utf-8.

ですので META tag にちゃんと charset を書け じゃないんでしょうか?

 <META http-equiv="Content-Type" content="text/html; charset=ISO-2022-JP">

とかですかね。

まぁ全部 iso-2022-jp なファイルだったら
 AddDefaultCharset on
 AddDefaultCharset iso-2022-jp 
でいいんでしょう。

後は http://www.apache.org/docs/mod/mod_mime.html#addcharset とか

> そのとき、 srm.conf を slink の時のと diff をとってみたのですが、
> 119c118
> < AddLanguage ja .ja
> ---
> > AddLanguage jp .jp
> という個所にも変更が加えられているようです。

ja が正しいです。
-- 
鵜飼文敏