[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Q] does w3m sometimes download garbage?
>> On Fri, 15 Oct 2004 10:34:42 +0900
>> yamaoka@jpl.org (Katsumi Yamaoka) said as follows:
>w3m-download specifies the second argument `no-decode' as t to the
>w3m-retrieve function so that it should not decode the contents.
>However, the contents of that url has been encoded with `deflate'.
>Does anyone know what is the right solution?
Short version of my answer:
I think that Katsumi's proposal is the right solution. `no-decode'
argument specifies that `w3m-retrieve' should not decode contents
even if they decoded with gzip, bzip2, or deflate.
Long version of my answer:
There are three layers to encode contents in HTTP, as far as I know.
The first layer is a filter to convert contents to fit transfer
layer constraints including base64 encoder, and is specified by
`Content-Transfer-Encoding' header. The second layer is a archiver
including gzip, bzip2 and deflate, and is specified by
`Content-Encoding' header. The last layer is an encoding of
characters, and is specified by `charset' attribute in
`Content-Type' header.
`no-decode' argument of `w3m-retrieve' is corresponding to the
second layer, and it specifies whether `w3m-retrieve' should expand
compressed contents or not.
If you want to display contents including other characters than
ASCII, you will have to call `w3m-decode-buffer' in addition to
calling `w3m-retrieve' without `no-decode' argument.
--
TSUCHIYA Masatoshi