[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Text mime types

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-06-12 14:15:37 CEST

Vincent Lefevre wrote:
> On 2005-06-11 23:18:53 +0100, Julian Foad wrote:
>
>>Vincent Lefevre wrote:
>>
>>>We would need a keyword for charset encoding and a keyword for
>>>file encoding. For instance, a file file-in-utf8.txt.gz would
>>>have a text/plain MIME type, a utf8 charset encoding and a gzip
>>>file encoding.
>>
>>No. The example "file-in-utf8.txt.gz" is an example of one encoding
>>within another.
>
> gzip is an encoding, but not a MIME type. From /etc/mime.types under
> Debian:
>
> # Note: Compression schemes like "gzip", "bzip", and "compress" are not
> # actually "mime-types". They are "encodings" and hence must _not_ have
> # entries in this file to map their extensions. The "mime-type" of an
> # encoded file refers to the type of data that has been encoded, not the
> # type of the encoding.
>
> So, svn:mime-type should contain text/plain and there should be a way
> to specify the file encoding (compression scheme). "utf8" is not an
> encoding in the MIME sense.

Hmm... I can't see how that would work in general. It could have made sense in
MIME's original context - attachments to email messages - where the compression
was perhaps temporary, to be automatically undone at the end of the transfer,
but I can't see that making sense where MIME types are used more generally to
describe arbitrary files. For example, what about a Zip (as in PKZIP) file?
That's a combination of compression and multi-file archiving. A single MIME
type can't represent the content of all the different files in the Zip archive,
so Zip would have to have its own MIME type. Then a single UTF8 file Zipped
would have a MIME type of "Zip", and a single UTF8 file gzipped would have a
MIME type of "UTF8 text". Maybe that's how it is, but that seems awfully ugly
to me and I don't imagine at the moment that that would be the right thing for
Subversion to do.

I'll try to read up on the standards and the current best practices on using
MIME types to get a better understanding of the issue, but I may not get around
to it any time soon.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jun 12 14:16:34 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.