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

Re: First impressions...

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-01-28 14:59:46 CET

On Mon, Jan 28, 2002 at 05:38:50AM -0600, Eric M. Hopper wrote:
> On Sun, 2002-01-27 at 21:37, Jon Trowbridge wrote:
> > On Fri, 2002-01-25 at 10:33, Eric M. Hopper wrote:
> > > I suspect that MIME
> > > type is not a good match. For example most source code would be
> > > text/plain, but LISP source would be best served by a diff that was
> > > aware of LISP's easily parsed expression syntax, not by some arbitrary
> > > delimeter like lines or words that has nothing to do with the structure
> > > of the language.
> >
> > Fine-grained mime types for source code certainly exist. You could mark
> > the file as text/x-lisp (or text/x-c, text/x-h, text/x-java, etc.)
>
> Yes, but then you get into encoding issues. Is your Java in UTF-8 or
> Unicode? How would you prefer to have it checked out? How about your
> C?

You're confusing MIME type with the character set, and the encoding of that
character set. The MIME type talks about the document type. The charset and
encoding are about the representation of that document.

It would be quite easy to attach character set and encoding properties.

> As I said, I think the information MIME type was designed to convey is
> somewhat of a mismatch for the information a revision control system
> needs to function.

I would disagree. I think you are/were conflating MIME type with the
character set/encoding issues.

> That said, I would like to see official MIME types that explicitly typed
> something as being source code written in a particular language. If
> it's important enough for a file extension, it's important enough for an
> official MIME type. I might humbly suggest a new source/ top level
> type. Though text/source- would also work.

I think that it would always remain text/, since that is the major type of
the document being referenced. The subtype is the question.

But that is neither here nor there. The original question came up with
content-type diff engines. Subversion can certainly retain enough
information to drive a diff engine selection process quite fine.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:00 2006

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.