[PHP-users 8303] Re: GET メソッドでの文字化けについて

Yasuo Ohgaki php-users@php.gr.jp
Wed, 26 Jun 2002 19:44:59 +0900


大垣です。

自分の記憶を信じても良かった様です。

Yasuo Ohgaki wrote:
>>HTTPではなく、HTMLの仕様なのでHTML4.0.1の仕様を見てみ
>>ました。
>>
>>http://www.w3.org/TR/1999/REC-html401-19991224/
>>の 17.13.3 Processing form dataには
>>
>>=======
>>Step three: Encode the form data set
>>
>>The form data set is then encoded according to
>>the content type specified by the enctype
>>attribute of the FORM element.
>>=======
> 
> 
> キーワード検索してそれらしき記述の部分を引用してしまいました。
> ここでは無く別の所のはずです。とりあえず別の場所という事で
> 訂正しておきます。
> 

最初の引用は間違っていませんでした。
content typeの定義にはaccept-charsetも含まれていて
====
accept-charset = charset list [CI]
    This attribute specifies the list of character encodings for input
data that is accepted by the server processing this form. The value is a
space- and/or comma-delimited list of charset values. The client must
interpret this list as an exclusive-or list, i.e., the server is able to
accept any single character encoding per entity received.

    The default value for this attribute is the reserved string
"UNKNOWN". User agents may interpret this value as the character
encoding that was used to transmit the document containing this FORM
element.
====

文字エンコーディングが指定されていない場合、UNKOWNになりこの場合、

User agents may interpret this value as the character encoding that was
used to transmit the document containing this FORM element.

という事なのでHTML4.0.1ではHTMLが記述されている文字エンコーディングで
送信する必要があります。

--
Yasuo Ohgaki